lattice-embed 0.7.2

SIMD-accelerated vector operations and embedding generation
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.93"
name = "lattice-embed"
version = "0.7.2"
authors = ["Ocean <ocean@lionagi.ai>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "SIMD-accelerated vector operations and embedding generation"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ohdearquant/lattice"
resolver = "2"

[features]
avx512 = []
default = [
    "native",
    "download",
]
download = [
    "native",
    "lattice-inference/download",
]
local = []
metal-gpu = ["lattice-inference/metal-gpu"]
native = ["dep:lattice-inference"]
wasm = [
    "native",
    "dep:wasm-bindgen",
    "dep:console_error_panic_hook",
]

[lib]
name = "lattice_embed"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[bin]]
name = "embed"
path = "src/bin/embed.rs"
required-features = ["native"]

[[example]]
name = "basic_embed"
path = "examples/basic_embed.rs"
required-features = ["native"]

[[example]]
name = "dump_parity_embeddings"
path = "examples/dump_parity_embeddings.rs"
required-features = ["native"]

[[example]]
name = "similarity"
path = "examples/similarity.rs"

[[test]]
name = "embed_drift_baseline"
path = "tests/embed_drift_baseline.rs"

[[test]]
name = "embed_parity_vs_hf"
path = "tests/embed_parity_vs_hf.rs"

[[test]]
name = "f16_feature_load_guard"
path = "tests/f16_feature_load_guard.rs"

[[test]]
name = "inference_dot_product_parity"
path = "tests/inference_dot_product_parity.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[[test]]
name = "simd_edge_cases"
path = "tests/simd_edge_cases.rs"

[[test]]
name = "simd_precision"
path = "tests/simd_precision.rs"

[[test]]
name = "tokenizer_parity_e2e"
path = "tests/tokenizer_parity_e2e.rs"

[[bench]]
name = "embeddings"
path = "benches/embeddings.rs"
harness = false

[[bench]]
name = "simd"
path = "benches/simd.rs"
harness = false

[[bench]]
name = "simd_bench"
path = "benches/simd_bench.rs"
harness = false

[[bench]]
name = "simd_opt_bench"
path = "benches/simd_opt_bench.rs"
harness = false

[[bench]]
name = "simsimd_comparison"
path = "benches/simsimd_comparison.rs"
harness = false

[dependencies.async-trait]
version = "0.1"

[dependencies.blake3]
version = "1.5"

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.lattice-inference]
version = "0.7.2"
features = [
    "std",
    "f16",
]
optional = true
default-features = false

[dependencies.lru]
version = "0.16.3"

[dependencies.parking_lot]
version = "0.12"

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2.0"

[dependencies.tracing]
version = "0.1"

[dev-dependencies.criterion]
version = "0.5"
features = ["async_tokio"]

[dev-dependencies.image]
version = "0.25"
features = ["png"]
default-features = false

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.simsimd]
version = "6"

[dev-dependencies.tempfile]
version = "3.10"

[dev-dependencies.tokio]
version = "1.0"
features = [
    "full",
    "rt-multi-thread",
    "macros",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.0"
features = [
    "full",
    "sync",
    "rt",
]

[target.'cfg(target_arch = "wasm32")'.dependencies.console_error_panic_hook]
version = "0.1"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.tokio]
version = "1.0"
features = [
    "sync",
    "rt",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "=0.2.105"
optional = true

[lints.clippy]
cloned_instead_of_copied = "warn"
implicit_clone = "warn"
incompatible_msrv = "allow"
large_enum_variant = "warn"
manual_let_else = "warn"
missing_safety_doc = "warn"
needless_range_loop = "allow"
needless_return = "warn"
redundant_closure_for_method_calls = "warn"
too_many_arguments = "warn"
type_complexity = "warn"
uninlined_format_args = "warn"

[lints.clippy.correctness]
level = "deny"
priority = -1

[lints.rust]
unsafe_op_in_unsafe_fn = "allow"