# 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.91"
name = "blazen-embed-candle"
version = "0.5.0"
authors = ["Zach Handley <zachhandley@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Local embedding backend for Blazen using HuggingFace candle"
readme = false
license = "MPL-2.0"
repository = "https://github.com/ZachHandley/Blazen"
resolver = "2"

[features]
accelerate = ["engine"]
cpu = ["engine"]
cuda = ["engine"]
default = ["cpu"]
engine = [
    "dep:candle-core",
    "dep:candle-nn",
    "dep:candle-transformers",
    "dep:tokenizers",
    "dep:hf-hub",
]
metal = ["engine"]

[lib]
name = "blazen_embed_candle"
path = "src/lib.rs"

[dependencies.blazen-model-cache]
version = "0.5.0"

[dependencies.candle-core]
version = "0.10"
optional = true
default-features = false

[dependencies.candle-nn]
version = "0.10"
optional = true

[dependencies.candle-transformers]
version = "0.10"
optional = true

[dependencies.hf-hub]
version = "0.4"
features = ["tokio"]
optional = true
default-features = false

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

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "2"

[dependencies.tokenizers]
version = "0.22"
features = [
    "onig",
    "progressbar",
]
optional = true
default-features = false

[dependencies.tokio]
version = "1"
features = ["full"]

[dependencies.tracing]
version = "0.1"

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.candle-core]
version = "0.10"
features = [
    "metal",
    "accelerate",
]
optional = true
default-features = false

[lints.clippy]
all = "warn"
pedantic = "warn"

[lints.rust]
dead_code = "warn"
unsafe_code = "warn"
