blazen-embed 0.1.137

Embedding backend facade for Blazen: picks fastembed (ORT) or tract (pure Rust) per target
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Facade over the concrete embedding backend for the current target.
//!
//! - On non-musl targets, re-exports `blazen-embed-fastembed` (fast C++ ONNX Runtime).
//! - On musl targets, re-exports `blazen-embed-tract` (pure-Rust ONNX inference via tract).
//!
//! Downstream code imports ONLY from this crate. The backend selection is invisible.

#[cfg(not(target_env = "musl"))]
pub use blazen_embed_fastembed::{
    FastEmbedError as EmbedError, FastEmbedModel as EmbedModel, FastEmbedOptions as EmbedOptions,
    FastEmbedResponse as EmbedResponse,
};

#[cfg(target_env = "musl")]
pub use blazen_embed_tract::{
    TractEmbedModel as EmbedModel, TractError as EmbedError, TractOptions as EmbedOptions,
    TractResponse as EmbedResponse,
};