[package]
name = "moltendb-core"
version = "1.0.0-rc7"
edition = "2024"
authors = ["Maximilian Both <admin@moltendb.dev>"]
description = "MoltenDB core engine — in-memory DashMap storage, WAL persistence, query evaluation. No HTTP, no auth."
license = "Apache-2.0"
repository = "https://github.com/maximilian27/MoltenDB"
keywords = ["nosql", "embedded", "local-first", "wasm", "json"]
categories = ["database-implementations", "wasm", "data-structures"]


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

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
rmp-serde = "1.3.1"
jsonschema = { version = "0.46.4", default-features = false, optional = true }
dashmap = "6.1.0"
base64 = "0.22"
chacha20poly1305 = "0.10"
rand_core = { version = "0.6", features = ["std"] }
argon2 = "0.5"
regex = "1.12.3"
tracing = "0.1.44"
tokio = { version = "1.50.0", default-features = false, features = ["sync", "time", "macros"] }
web-time = "1.0.0"
rmp = "0.8.15"

[features]
default = ["schema"]
schema = ["dep:jsonschema"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
uuid = { version = "1.22", features = ["v4", "v7", "serde", "js"] }
getrandom = { version = "0.3", features = ["wasm_js"] }
getrandom02 = { package = "getrandom", version = "0.2", features = ["js"] }

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

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bincode = "1.3.3"
memmap2 = "0.9"
flate2 = "1"
tokio = { version = "1.49.0", features = ["full"] }
uuid = { version = "1.22", features = ["v4", "v7", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
rayon = "1.10"
dashmap = { version = "6.1.0", features = ["rayon"] }


[dev-dependencies]
tempfile = "3.10"
