# 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.95"
name = "basemyai-core"
version = "0.1.0"
authors = ["BaseMyAI contributors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Business-agnostic embedded foundation: libSQL (native vector + encryption), Candle embeddings, async maintenance."
documentation = "https://docs.rs/basemyai-core"
readme = false
keywords = [
    "embedded",
    "vector-search",
    "libsql",
    "embeddings",
    "sqlite",
]
categories = [
    "database-implementations",
    "algorithms",
]
license = "MIT"
repository = "https://github.com/basemyai/basemyai"

[features]
crypto = ["libsql/encryption"]
default = []
embed = [
    "dep:candle-core",
    "dep:candle-nn",
    "dep:candle-transformers",
    "dep:tokenizers",
    "dep:serde_json",
]

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

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

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

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

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

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

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

[dependencies.candle-core]
version = "0.8"
optional = true

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

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

[dependencies.libsql]
version = "0.9.30"
features = ["core"]
default-features = false

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

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.tokenizers]
version = "0.21"
features = ["onig"]
optional = true
default-features = false

[dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "sync",
    "time",
]

[dependencies.tracing]
version = "0.1"

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "sync",
    "time",
]

[lints.clippy]
await_holding_lock = "warn"
clone_on_ref_ptr = "warn"
cloned_instead_of_copied = "warn"
explicit_into_iter_loop = "warn"
implicit_clone = "warn"
inefficient_to_string = "warn"
lossy_float_literal = "warn"
mutex_atomic = "warn"
option_as_ref_cloned = "warn"
redundant_clone = "warn"
set_contains_or_insert = "warn"
todo = "warn"
trivially_copy_pass_by_ref = "warn"
unnecessary_to_owned = "warn"
unwrap_used = "warn"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.rust]
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"

[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1
