# 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.93.0"
name = "spacetimedb-lib"
version = "2.5.0"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A common library for SpacetimeDB"
readme = "README.md"
license-file = "LICENSE"

[features]
default = [
    "serde",
    "metrics_impls",
]
enum-map = ["dep:enum-map"]
memory-usage = [
    "dep:spacetimedb-memory-usage",
    "spacetimedb-primitives/memory-usage",
    "spacetimedb-sats/memory-usage",
]
metrics_impls = [
    "dep:spacetimedb-metrics",
    "spacetimedb-sats/metrics_impls",
]
proptest = [
    "dep:proptest",
    "dep:proptest-derive",
]
serde = [
    "dep:serde",
    "spacetimedb-sats/serde",
]
test = [
    "proptest",
    "spacetimedb-sats/test",
]

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

[[test]]
name = "serde"
path = "tests/serde.rs"
required-features = ["serde"]

[dependencies.anyhow]
version = "1.0.68"

[dependencies.bitflags]
version = "2.3.3"

[dependencies.blake3]
version = "1.5.1"

[dependencies.bytes]
version = "1.10.1"

[dependencies.chrono]
version = "0.4.24"
default-features = false

[dependencies.derive_more]
version = "0.99"

[dependencies.enum-as-inner]
version = "0.6"

[dependencies.enum-map]
version = "2.6.3"
optional = true

[dependencies.hex]
version = "0.4.3"

[dependencies.itertools]
version = "0.12"

[dependencies.log]
version = "0.4.17"

[dependencies.proptest]
version = "1.4"
optional = true

[dependencies.proptest-derive]
version = "0.5"
optional = true

[dependencies.serde]
version = "1.0.136"
features = ["derive"]
optional = true

[dependencies.spacetimedb-bindings-macro]
version = "=2.5.0"

[dependencies.spacetimedb-memory-usage]
version = "=2.5.0"
optional = true
default-features = false

[dependencies.spacetimedb-metrics]
version = "=2.5.0"
optional = true

[dependencies.spacetimedb-primitives]
version = "=2.5.0"

[dependencies.spacetimedb-sats]
version = "=2.5.0"

[dependencies.thiserror]
version = "1.0.37"

[dev-dependencies.bytes]
version = "1.10.1"

[dev-dependencies.insta]
version = "1.21.0"
features = [
    "toml",
    "filters",
]

[dev-dependencies.proptest]
version = "1.4"

[dev-dependencies.proptest-derive]
version = "0.5"

[dev-dependencies.ron]
version = "0.8"

[dev-dependencies.serde_json]
version = "1.0.128"
features = ["raw_value"]

[lints.clippy]
result_large_err = "allow"

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