[package]
name = "moltendb"
version = "0.1.0-alpha.25"
edition = "2024"
authors = ["Maximilian Both <maximilian.both27@outlook.com>"]
description = "A real-time, local-first NoSQL database written in Rust."
license = "BUSL-1.1"
license-file = "LICENSE.md"
repository = "https://github.com/maximilian27/MoltenDB"
readme = "README.md"
keywords = ["nosql", "embedded", "local-first", "wasm", "json"]
categories = ["database-implementations", "wasm", "data-structures"]

[lib]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "moltendb"
path = "src/main.rs"
test = false

[[example]]
name = "generate_stress_data"
path = "examples/generate_stress_data.rs"

[[example]]
name = "stress_insert"
path = "examples/stress_insert.rs"

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true
panic = "abort"

[dev-dependencies]
reqwest = { version = "0.12", features = ["blocking", "json", "native-tls"] }

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
dashmap = "6.1.0"
uuid = { version = "1.22", features = ["v7", "serde"] }
regex = "1.12.3"
tracing = "0.1.44"
tokio = { version = "1.50.0", default-features = false, features = ["sync", "time", "macros"] }
web-sys = "0.3.91"
console_error_panic_hook = "0.1.7"
web-time = "1.0.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
argon2 = "0.5"
axum = { version = "0.8.8", features = ["ws"] }
axum-server = { version = "0.8.0", features = ["tls-rustls"] }
base64 = "0.22"
bcrypt = "0.19.0"
bincode = "1.3.3"
chacha20poly1305 = "0.10"
clap = { version = "4", features = ["derive", "env"] }
futures = "0.3.31"
jsonwebtoken = { version = "10.3.0", features = ["rust_crypto"] }
memmap2 = "0.9"
rand_core = { version = "0.6", features = ["std"] }
tokio = { version = "1.49.0", features = ["full"] }
tokio-tungstenite = "0.28.0"
tower = "0.5.3"
tower-http = { version = "0.6.8", features = ["limit", "set-header", "cors"] }
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.114"
wasm-bindgen-futures = "0.4.62"
js-sys = "0.3.89"
serde-wasm-bindgen = "0.6"
getrandom = { version = "0.2.17", features = ["js"] }
console_error_panic_hook = "0.1.7"
uuid = { version = "1.20", features = ["v7", "serde", "js"] }

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3.89"
features = [
    "console",
    "Window",
    "MessageEvent",
    "WorkerGlobalScope",
    "WorkerNavigator",
    "StorageManager",
    "FileSystemDirectoryHandle",
    "FileSystemFileHandle",
    "FileSystemSyncAccessHandle",
    "FileSystemGetFileOptions",
    "FileSystemReadWriteOptions"
]

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
