# 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 = "brainwires-storage"
version = "0.9.0"
authors = ["Brainwires"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Backend-agnostic storage, tiered memory, and document management for the Brainwires Agent Framework"
homepage = "https://github.com/Brainwires/brainwires-framework"
documentation = "https://docs.rs/brainwires-storage"
readme = "README.md"
keywords = [
    "vector-database",
    "lancedb",
    "semantic-search",
    "embeddings",
    "tiered-memory",
]
categories = ["database"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/Brainwires/brainwires-framework"
resolver = "2"

[features]
alt-folder-name = []
default = ["native"]
full = ["native"]
lance-backend = [
    "dep:lancedb",
    "dep:arrow-array",
    "dep:arrow-schema",
    "dep:futures",
    "dep:sha2",
    "dep:tantivy",
    "dep:globset",
]
milvus-backend = [
    "lance-backend",
    "dep:reqwest",
]
mysql-backend = [
    "lance-backend",
    "dep:mysql_async",
]
native = [
    "lance-backend",
    "dep:fastembed",
    "dep:lru",
    "dep:rusqlite",
    "dep:base64",
    "dep:gethostname",
    "dep:dirs",
    "dep:libc",
    "tokio/rt",
    "tokio/macros",
    "brainwires-core/native",
]
nornicdb-backend = [
    "lance-backend",
    "dep:reqwest",
]
nornicdb-bolt = [
    "nornicdb-backend",
    "dep:neo4rs",
]
nornicdb-full = [
    "nornicdb-bolt",
    "nornicdb-grpc",
]
nornicdb-grpc = [
    "nornicdb-backend",
    "dep:qdrant-client",
]
pinecone-backend = [
    "lance-backend",
    "dep:reqwest",
]
postgres-backend = [
    "lance-backend",
    "dep:tokio-postgres",
    "dep:deadpool-postgres",
    "dep:pgvector",
]
qdrant-backend = [
    "lance-backend",
    "dep:qdrant-client",
]
surrealdb-backend = [
    "lance-backend",
    "dep:surrealdb",
]
vector-db = ["lance-backend"]
wasm = ["brainwires-core/wasm"]
weaviate-backend = [
    "lance-backend",
    "dep:reqwest",
]

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

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

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

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

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

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

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

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

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

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

[dependencies.anyhow]
version = "1"

[dependencies.arrow-array]
version = "57"
optional = true

[dependencies.arrow-schema]
version = "57"
optional = true

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

[dependencies.base64]
version = "0.22"
optional = true

[dependencies.brainwires-core]
version = "0.9.0"

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

[dependencies.deadpool-postgres]
version = "0.14"
optional = true

[dependencies.dirs]
version = "6"
optional = true

[dependencies.fastembed]
version = "5.1"
optional = true

[dependencies.futures]
version = "0.3"
optional = true

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

[dependencies.globset]
version = "0.4"
optional = true

[dependencies.lancedb]
version = "0.27"
optional = true

[dependencies.libc]
version = "0.2"
optional = true

[dependencies.lru]
version = "0.16"
optional = true

[dependencies.mysql_async]
version = "0.34"
optional = true

[dependencies.neo4rs]
version = "0.9.0-rc.9"
optional = true

[dependencies.pgvector]
version = "0.4.1"
features = ["postgres"]
optional = true

[dependencies.qdrant-client]
version = "1.15"
optional = true

[dependencies.regex]
version = "1"

[dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "stream",
]
optional = true

[dependencies.rusqlite]
version = "0.38"
features = ["bundled"]
optional = true

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

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.10"
optional = true

[dependencies.surrealdb]
version = "2"
features = [
    "protocol-ws",
    "kv-mem",
]
optional = true

[dependencies.tantivy]
version = "0.22"
optional = true

[dependencies.tokio]
version = "1.43"
features = [
    "sync",
    "time",
]

[dependencies.tokio-postgres]
version = "0.7"
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.uuid]
version = "1"
features = [
    "v4",
    "serde",
]

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

[dev-dependencies.tokio]
version = "1.43"
features = [
    "full",
    "full",
    "test-util",
]
