Building from Source¶
This repository contains the DecentDB Rust engine. The supported local workflow is Cargo-based.
Prerequisites¶
- Rust via rustup
- A normal platform toolchain capable of building Rust crates with native code dependencies (for example
build-essentialon Debian/Ubuntu or Xcode command line tools on macOS)
Build the workspace¶
From the repository root:
That builds:
crates/decentdb— the core engine crate plus the shared library artifactcrates/decentdb-cli— thedecentdbcommand-line tool
Useful build targets¶
Build just the native library crate:
Build just the CLI binary:
Optimized release build:
Shared library outputs¶
cargo build -p decentdb produces the Rust cdylib used by the binding smoke programs and the in-tree Dart package:
- Linux:
target/debug/libdecentdb.so - macOS:
target/debug/libdecentdb.dylib - Windows:
target/debug/decentdb.dll
Release builds use the same names under target/release/.
Install the CLI locally¶
That places decentdb in Cargo's bin directory (typically ~/.cargo/bin).
Helpful Cargo aliases¶
The repository ships a few convenience aliases in .cargo/config.toml:
cargo t # nextest run
cargo test-all # nextest run --all-features
cargo lint # clippy --all-targets --all-features -- -D warnings
Use plain cargo build, cargo test, and cargo clippy if you prefer not to rely on aliases.