[package]
name = "surrealdb"
publish = true
edition = "2021"
version = "2.1.0"
rust-version = "1.80.1"
readme = "CARGO.md"
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
description = "A scalable, distributed, collaborative, document-graph database, for the realtime web"
repository = "https://github.com/surrealdb/surrealdb"
homepage = "https://github.com/surrealdb/surrealdb"
documentation = "https://docs.rs/surrealdb/"
keywords = [
"database",
"embedded-database",
"key-value",
"key-value-store",
"kv-store",
]
categories = ["database-implementations", "data-structures", "embedded"]
license-file = "../LICENSE"
resolver = "2"
[features]
default = ["protocol-ws", "rustls"]
protocol-http = ["dep:reqwest"]
protocol-ws = ["dep:tokio-tungstenite", "dep:trice", "tokio/time"]
kv-mem = ["surrealdb-core/kv-mem", "tokio/time"]
kv-indxdb = ["surrealdb-core/kv-indxdb"]
kv-rocksdb = ["surrealdb-core/kv-rocksdb", "tokio/time"]
kv-tikv = ["surrealdb-core/kv-tikv", "tokio/time"]
kv-fdb = ["surrealdb-core/kv-fdb", "tokio/time"]
kv-surrealkv = ["surrealdb-core/kv-surrealkv", "tokio/time"]
kv-surrealcs = ["surrealdb-core/kv-surrealcs", "tokio/time"]
scripting = ["surrealdb-core/scripting"]
http = ["surrealdb-core/http"]
native-tls = [
"dep:native-tls",
"reqwest?/native-tls",
"tokio-tungstenite?/native-tls",
]
rustls = [
"dep:rustls",
"reqwest?/rustls-tls",
"tokio-tungstenite?/rustls-tls-webpki-roots",
]
ml = ["surrealdb-core/ml"]
jwks = ["surrealdb-core/jwks"]
arbitrary = ["surrealdb-core/arbitrary"]
kv-fdb-7_1 = ["surrealdb-core/kv-fdb-7_1"]
kv-fdb-7_3 = ["surrealdb-core/kv-fdb-7_3"]
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
features = [
"protocol-ws",
"protocol-http",
"kv-mem",
"kv-rocksdb",
"rustls",
"native-tls",
"http",
"scripting",
]
targets = []
[dependencies]
arrayvec = "0.7.6"
bincode = "1.3.3"
channel = { version = "2.3.1", package = "async-channel" }
chrono = { version = "0.4.38", features = ["serde"] }
dmp = "0.2.0"
futures = "0.3.30"
geo = { version = "0.28.0", features = ["use-serde"] }
indexmap = { version = "2.1.0", features = ["serde"] }
native-tls = { version = "0.2.11", optional = true }
path-clean = "1.0.1"
reqwest = { version = "0.12.7", default-features = false, features = [
"json",
"multipart",
"stream",
], optional = true }
revision = { version = "0.10.0", features = [
"chrono",
"geo",
"roaring",
"regex",
"rust_decimal",
"uuid",
] }
rust_decimal = { version = "1.36.0", features = ["maths", "serde-str"] }
rustls = { version = "0.23.12", default-features = false, features = [
"ring",
"logging",
"std",
"tls12",
], optional = true }
reblessive = { version = "0.4.1", features = ["tree"] }
rustls-pki-types = { version = "1.7.0", features = ["web"] }
semver = { version = "1.0.20", features = ["serde"] }
serde = { version = "1.0.209", features = ["derive"] }
serde_json = "1.0.127"
serde-content = "0.1.0"
surrealdb-core = { version = "=2.1.0", default-features = false, path = "../core", package = "surrealdb-core" }
thiserror = "1.0.63"
tokio-util = { version = "0.7.11", features = ["compat"] }
tracing = "0.1.40"
trice = { version = "0.4.0", optional = true }
url = "2.5.0"
[dev-dependencies]
ciborium = "0.2.1"
criterion = { version = "0.5.1", features = ["async_tokio"] }
env_logger = "0.10.1"
flate2 = "1.0.28"
hashbrown = "0.14.5"
pprof = { version = "0.13.0", features = ["flamegraph", "criterion"] }
radix_trie = "0.2.1"
rand = "0.8.5"
regex = "1.10.6"
serial_test = "2.0.0"
temp-dir = "0.1.11"
test-log = { version = "0.2.13", features = ["trace"] }
time = { version = "0.3.36", features = ["serde"] }
tokio = { version = "1.40.0", features = ["macros", "sync", "rt-multi-thread"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
ulid = { version = "1.1.0", features = ["serde"] }
wiremock = "0.6.0"
[target.'cfg(target_arch = "wasm32")'.dependencies]
pharos = "0.5.3"
ring = { version = "0.17.7", features = ["wasm32_unknown_unknown_js"] }
tokio = { version = "1.40.0", default-features = false, features = [
"rt",
"sync",
] }
uuid = { version = "1.10.0", features = ["serde", "js", "v4", "v7"] }
wasm-bindgen-futures = "0.4.39"
wasmtimer = { version = "0.2.0", default-features = false, features = [
"tokio",
] }
ws_stream_wasm = "0.7.4"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.40.0", default-features = false, features = [
"macros",
"io-util",
"io-std",
"fs",
"rt-multi-thread",
"time",
"sync",
] }
tokio-tungstenite = { version = "0.23.1", optional = true, features = ["url"] }
uuid = { version = "1.10.0", features = ["serde", "v4", "v7"] }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(storage)',
'cfg(surrealdb_unstable)',
] }
[lib]
name = "surrealdb"
bench = false
[[bench]]
name = "executor"
harness = false
[[bench]]
name = "parser"
harness = false
[[bench]]
name = "processor"
harness = false
[[bench]]
name = "hash_trie_btree"
harness = false
[[bench]]
name = "index_btree"
harness = false
[[bench]]
name = "index_mtree"
harness = false
[[bench]]
name = "index_hnsw"
harness = false
[[bench]]
name = "move_vs_clone"
harness = false
[[bench]]
name = "sdb"
harness = false
[[bench]]
name = "hashset_vs_vector"
harness = false
[[bench]]
name = "with_or_without_index"
harness = false
[[bench]]
name = "order"
harness = false