# 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"
name = "surrealdb"
version = "3.0.0"
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
build = "build.rs"
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web"
homepage = "https://github.com/surrealdb/surrealdb"
documentation = "https://docs.rs/surrealdb/"
readme = "CARGO.md"
keywords = [
    "database",
    "embedded-database",
    "key-value",
    "key-value-store",
    "kv-store",
]
categories = [
    "database-implementations",
    "data-structures",
    "embedded",
]
license-file = "LICENSE"
repository = "https://github.com/surrealdb/surrealdb"

[package.metadata.docs.rs]
rustdoc-args = [
    "--cfg",
    "docsrs",
]
features = [
    "protocol-ws",
    "protocol-http",
    "kv-mem",
    "kv-rocksdb",
    "rustls",
    "native-tls",
    "http",
    "scripting",
]
targets = []

[features]
allocation-tracking = ["surrealdb-core/allocation-tracking"]
allocator = ["surrealdb-core/allocator"]
arbitrary = ["surrealdb-core/arbitrary"]
default = [
    "protocol-ws",
    "rustls",
]
http = ["surrealdb-core/http"]
jwks = ["surrealdb-core/jwks"]
kv-indxdb = ["surrealdb-core/kv-indxdb"]
kv-mem = [
    "surrealdb-core/kv-mem",
    "tokio/time",
]
kv-rocksdb = [
    "surrealdb-core/kv-rocksdb",
    "tokio/time",
]
kv-surrealkv = [
    "surrealdb-core/kv-surrealkv",
    "tokio/time",
]
kv-tikv = [
    "surrealdb-core/kv-tikv",
    "tokio/time",
]
ml = ["surrealdb-core/ml"]
native-tls = [
    "dep:native-tls",
    "reqwest?/native-tls",
    "tokio-tungstenite?/native-tls",
]
protocol-http = ["dep:reqwest"]
protocol-ws = [
    "dep:tokio-tungstenite",
    "tokio/time",
]
rustls = [
    "dep:rustls",
    "reqwest?/default-tls",
    "tokio-tungstenite?/rustls-tls-webpki-roots",
]
scripting = ["surrealdb-core/scripting"]

[lib]
name = "surrealdb"
path = "src/lib.rs"
bench = false

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.anyhow]
version = "1.0.100"

[dependencies.async-channel]
version = "2.5.0"

[dependencies.boxcar]
version = "0.2.14"

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

[dependencies.futures]
version = "0.3.31"

[dependencies.indexmap]
version = "2.13.0"
features = ["serde"]

[dependencies.native-tls]
version = "0.2.14"
optional = true

[dependencies.path-clean]
version = "1.0.1"

[dependencies.reqwest]
version = "0.13.1"
features = [
    "json",
    "multipart",
    "stream",
]
optional = true
default-features = false

[dependencies.semver]
version = "1.0.27"
features = ["serde"]

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

[dependencies.serde_json]
version = "1.0.149"

[dependencies.surrealdb-core]
version = "3.0.0"
default-features = false

[dependencies.surrealdb-types]
version = "3.0.0"

[dependencies.tokio-util]
version = "0.7.18"
features = ["compat"]

[dependencies.tracing]
version = "0.1.44"
features = ["release_max_level_debug"]

[dependencies.url]
version = "2.5.8"

[dev-dependencies.ciborium]
version = "0.2.2"

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

[dev-dependencies.env_logger]
version = "0.11.8"

[dev-dependencies.flate2]
version = "1.1.8"

[dev-dependencies.parking_lot]
version = "0.12.5"

[dev-dependencies.pprof]
version = "0.15.0"
features = [
    "flamegraph",
    "criterion",
]

[dev-dependencies.radix_trie]
version = "0.3.0"

[dev-dependencies.rand]
version = "0.8.5"
features = ["small_rng"]

[dev-dependencies.rayon]
version = "1.11.0"

[dev-dependencies.regex]
version = "1.12.2"

[dev-dependencies.rstest]
version = "0.26.1"

[dev-dependencies.serial_test]
version = "3.3.1"

[dev-dependencies.temp-dir]
version = "0.1.16"

[dev-dependencies.test-log]
version = "0.2.19"
features = ["trace"]

[dev-dependencies.time]
version = "0.3.47"
features = ["serde"]

[dev-dependencies.tokio]
version = "1.49.0"
features = [
    "macros",
    "sync",
    "rt-multi-thread",
]
default-features = false

[dev-dependencies.tracing-subscriber]
version = "0.3.22"
features = ["env-filter"]

[dev-dependencies.ulid]
version = "1.2.1"
features = ["serde"]

[dev-dependencies.wiremock]
version = "0.6.5"

[target.'cfg(not(target_family = "wasm"))'.dependencies.rustls]
version = "0.23.36"
features = [
    "logging",
    "std",
    "tls12",
    "aws_lc_rs",
]
optional = true
default-features = false

[target.'cfg(not(target_family = "wasm"))'.dependencies.tokio]
version = "1.49.0"
features = [
    "macros",
    "io-util",
    "io-std",
    "fs",
    "rt-multi-thread",
    "time",
    "sync",
]
default-features = false

[target.'cfg(not(target_family = "wasm"))'.dependencies.tokio-tungstenite]
version = "0.28.0"
features = ["url"]
optional = true

[target.'cfg(not(target_family = "wasm"))'.dependencies.uuid]
version = "1.19.0"
features = [
    "serde",
    "v4",
    "v7",
]

[target.'cfg(target_family = "wasm")'.dependencies.getrandom]
version = "0.3.4"
features = ["wasm_js"]

[target.'cfg(target_family = "wasm")'.dependencies.js-sys]
version = "0.3"

[target.'cfg(target_family = "wasm")'.dependencies.ring]
version = "0.17.14"
features = ["wasm32_unknown_unknown_js"]

[target.'cfg(target_family = "wasm")'.dependencies.rustls]
version = "0.23.36"
features = [
    "logging",
    "std",
    "tls12",
    "ring",
]
optional = true
default-features = false

[target.'cfg(target_family = "wasm")'.dependencies.rustls-pki-types]
version = "1.14.0"
features = ["web"]

[target.'cfg(target_family = "wasm")'.dependencies.tokio]
version = "1.49.0"
features = [
    "rt",
    "sync",
]
default-features = false

[target.'cfg(target_family = "wasm")'.dependencies.tokio-tungstenite-wasm]
version = "0.8.1"

[target.'cfg(target_family = "wasm")'.dependencies.uuid]
version = "1.19.0"
features = [
    "serde",
    "js",
    "v4",
    "v7",
]

[target.'cfg(target_family = "wasm")'.dependencies.wasm-bindgen]
version = "0.2"

[target.'cfg(target_family = "wasm")'.dependencies.wasm-bindgen-futures]
version = "0.4.58"

[target.'cfg(target_family = "wasm")'.dependencies.wasmtimer]
version = "0.4.3"
features = ["tokio"]
default-features = false

[target.'cfg(target_family = "wasm")'.dependencies.web-sys]
version = "0.3"
features = [
    "Window",
    "Request",
    "RequestInit",
    "Response",
]

[lints.clippy]
allow_attributes = "allow"
assigning_clones = "warn"
bool_assert_comparison = "allow"
cloned_instead_of_copied = "warn"
debug_assert_with_mut_call = "warn"
disallowed_methods = "warn"
explicit_into_iter_loop = "warn"
fallible_impl_from = "warn"
get_unwrap = "warn"
implicit_clone = "warn"
inefficient_to_string = "warn"
large_types_passed_by_value = "warn"
lossy_float_literal = "warn"
option_as_ref_cloned = "warn"
redundant_clone = "warn"
set_contains_or_insert = "warn"
unnecessary_to_owned = "warn"
unused_async = "allow"
unwrap_used = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(docker)",
    "cfg(storage)",
]
