[package]
name = "basemyai-core"
description = "Business-agnostic embedded foundation: libSQL (native vector + encryption), Candle embeddings, async maintenance."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
documentation = "https://docs.rs/basemyai-core"
keywords = ["embedded", "vector-search", "libsql", "embeddings", "sqlite"]
categories = ["database-implementations", "algorithms"]

[features]
default = []
# Inférence ML (Candle) — opt-in : un consommateur peut fournir son propre
# Embedder via le trait sans compiler Candle.
embed = ["dep:candle-core", "dep:candle-nn", "dep:candle-transformers", "dep:tokenizers", "dep:serde_json"]
# Chiffrement au repos (libSQL/SQLite3MultipleCiphers) — exige CMake.
crypto = ["libsql/encryption"]

[dependencies]
thiserror.workspace = true
serde.workspace = true
tracing.workspace = true
async-trait.workspace = true
# Boucle de maintenance async (spawn + sleep). rt/time/macros suffisent.
tokio.workspace = true
candle-core = { workspace = true, optional = true }
candle-nn = { workspace = true, optional = true }
candle-transformers = { workspace = true, optional = true }
tokenizers = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
# libSQL : vecteur natif (pas d'extension à linker), SQLite-compat, async.
# Le cœur compile sans CMake ; `crypto` ajoute le chiffrement (qui l'exige).
libsql = { version = "0.9.30", default-features = false, features = ["core"] }

[dev-dependencies]
tokio.workspace = true

[lints]
workspace = true
