[package]
edition = "2024"
name = "frankensearch-embed"
version = "0.2.2"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Embedder implementations for frankensearch (hash, model2vec, fastembed)"
readme = "README.md"
license-file = "LICENSE"
repository = "https://github.com/Dicklesworthstone/frankensearch"
[features]
api = [
"asupersync/tls",
"asupersync/tls-webpki-roots",
]
bench-internals = ["frankensearch-core/bench-internals"]
bundled-default-models = [
"model2vec",
"fastembed",
]
default = ["hash"]
download = [
"asupersync/tls",
"asupersync/tls-webpki-roots",
]
fastembed = ["dep:fastembed"]
hash = ["dep:rayon"]
model2vec = [
"dep:safetensors",
"dep:tokenizers",
"dep:rayon",
]
[lib]
name = "frankensearch_embed"
path = "src/lib.rs"
[[example]]
name = "minilm_embed_corpus"
path = "examples/minilm_embed_corpus.rs"
required-features = ["fastembed"]
[[example]]
name = "potion_embed_corpus"
path = "examples/potion_embed_corpus.rs"
required-features = ["model2vec"]
[[test]]
name = "model_cache_tests"
path = "tests/model_cache_tests.rs"
[[test]]
name = "model_download_tests"
path = "tests/model_download_tests.rs"
[[test]]
name = "model_integrity_tests"
path = "tests/model_integrity_tests.rs"
[[test]]
name = "model_manifest_tests"
path = "tests/model_manifest_tests.rs"
[[test]]
name = "offline_fallback_tests"
path = "tests/offline_fallback_tests.rs"
[[test]]
name = "scoped_logging_contract"
path = "tests/scoped_logging_contract.rs"
[[bench]]
name = "cache_replay"
path = "benches/cache_replay.rs"
harness = false
[[bench]]
name = "hash_embed"
path = "benches/hash_embed.rs"
harness = false
[[bench]]
name = "model2vec_batch_parallel"
path = "benches/model2vec_batch_parallel.rs"
harness = false
required-features = ["model2vec"]
[[bench]]
name = "model2vec_gather_prefetch"
path = "benches/model2vec_gather_prefetch.rs"
harness = false
required-features = [
"model2vec",
"bench-internals",
]
[dependencies.asupersync]
version = ">=0.4.4, <0.5"
features = ["proc-macros"]
default-features = false
[dependencies.fastembed]
version = "=6.0.0"
features = ["ort-download-binaries-rustls-tls"]
optional = true
default-features = false
[dependencies.frankensearch-core]
version = "0.2.2"
[dependencies.rayon]
version = "1.10"
optional = true
[dependencies.safetensors]
version = "0.8.0"
optional = true
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.sha2]
version = "0.11.0"
[dependencies.tempfile]
version = "3"
[dependencies.tokenizers]
version = "0.23.1"
features = ["fancy-regex"]
optional = true
default-features = false
[dependencies.tracing]
version = "0.1"
[dev-dependencies.asupersync]
version = ">=0.4.4, <0.5"
features = [
"proc-macros",
"test-internals",
]
default-features = false
[dev-dependencies.criterion]
version = "0.8.2"
features = ["html_reports"]
[dev-dependencies.rayon]
version = "1.10"
[dev-dependencies.safetensors]
version = "0.8.0"
[dev-dependencies.tokenizers]
version = "0.23.1"
features = ["fancy-regex"]
default-features = false
[build-dependencies.sha2]
version = "0.11.0"
[lints.clippy]
cast_precision_loss = "allow"
collapsible_if = "allow"
collapsible_match = "allow"
duration_suboptimal_units = "allow"
if_not_else = "allow"
implicit_hasher = "allow"
items_after_statements = "allow"
manual_is_multiple_of = "allow"
map_unwrap_or = "allow"
match_same_arms = "allow"
missing_const_for_fn = "allow"
missing_panics_doc = "allow"
no_effect_underscore_binding = "allow"
redundant_clone = "allow"
redundant_closure_for_method_calls = "allow"
single_match_else = "allow"
suboptimal_flops = "allow"
too_many_arguments = "allow"
too_many_lines = "allow"
uninlined_format_args = "allow"
unused_async = "allow"
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
unsafe_code = "deny"