Skip to main content

Crate blazen_embed

Crate blazen_embed 

Source
Expand description

Facade over the concrete embedding backend for the current target.

Backend selection priority:

  1. --features embed-fastembed forces the fastembed (ORT) backend.
  2. --features embed-tract forces the pure-Rust tract backend.
  3. Otherwise the target-cfg in Cargo.toml picks the default:
    • fastembed on aarch64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu (the only triples with ORT prebuilts).
    • tract on every other target (aarch64-linux, musl, all wasm, aarch64-windows, AND x86_64-apple-darwin — pyke dropped the Intel-mac ORT prebuilt, so the facade routes Intel macs to tract here).

Downstream code imports ONLY from this crate. The backend selection is invisible.

embed-fastembed and embed-tract are documented as mutually exclusive. If both are set, fastembed wins (the re-export below picks it first); this is a soft guarantee — prefer enabling exactly one.

Structs§

EmbedModel
A local embedding model backed by fastembed (ONNX Runtime).
EmbedOptions
Options for constructing a FastEmbedModel.
EmbedResponse
Response from a fastembed embedding operation.

Enums§

EmbedError
Error type for fastembed operations.