Install
corvid is a Rust library. Today it is consumed three ways:
- From Rust — a git dependency (crates.io publication is planned; see bindings roadmap).
- From C or any C-FFI language — the release artifacts of the engine:
the
corvidcdylib plus the generatedcorvid.h, attached to every engine release. - From Node.js — the
corvid-nodenpm package with prebuilt binaries.
Rust (git dependency)
Section titled “Rust (git dependency)”[dependencies]corvid = { git = "https://github.com/corvid-db/corvid" }Pin a tag if you want reproducible builds (recommended while pre-1.0):
[dependencies]corvid = { git = "https://github.com/corvid-db/corvid", tag = "v0.2.1" }Requires stable Rust, 2024 edition, MSRV 1.88. The default build has no
required features and pulls in only redb; the engine is
#![forbid(unsafe_code)].
Optional cargo features
Section titled “Optional cargo features”Both features are OFF by default so the default build stays dependency-minimal (and the WASM size budget stays a contract):
| Feature | What it does | Enable with |
|---|---|---|
zstd | Transparent compression of stored documents at/above 1 KiB. Queries, scans, indexes, dump/load all behave identically — just smaller on disk (~12× on structured text; vector payloads barely compress). | corvid = { features = ["zstd"] } |
tracing | Structured instrumentation events at the engine’s load-bearing points, for any tracing-compatible subscriber. | corvid = { features = ["tracing"] } |
See feature flags for details and caveats (notably: backups are physical copies and not portable across feature builds — use dump/load to move between configurations).
The C ABI (release artifacts)
Section titled “The C ABI (release artifacts)”Every engine release attaches a per-platform FFI archive containing the
cdylib, corvid.h, and golden fixtures, with sha256 entries in
checksums.txt:
- Linux:
libcorvid.so - macOS:
libcorvid.dylib(install name@rpath/libcorvid.dylibsince v0.2.1) - Windows:
corvid.dllplus its MSVC import librarycorvid.dll.lib— link the import lib, place the DLL on the loader path
The contract these artifacts implement is the C ABI specification.
corvid-c shows the full consumption pattern: fetch a
pinned release, verify checksums, link, run the golden suite.
If you prefer to build from source:
git clone https://github.com/corvid-db/corvidcd corvidcargo build -p corvid-ffi --release# → target/release/libcorvid.{so,dylib} or corvid.dll, plus corvid.hNode.js
Section titled “Node.js”npm i corvid-nodePrebuilt binaries cover darwin-arm64, darwin-x64, linux-x64-gnu,
linux-arm64-gnu, and win32-x64-msvc; other platforms build from source
(Rust ≥ 1.88 + a C toolchain). See corvid-node.
The MCP sidecar
Section titled “The MCP sidecar”The corvid-mcp binary ships on the engine’s releases (Linux x86_64/aarch64,
macOS Intel/Apple Silicon, Windows x86_64):
# from source:cargo run -p corvid-mcp -- app.corvid # file-backed; omit the path for in-memorySee the MCP sidecar.
Platform support
Section titled “Platform support”| Target | Status |
|---|---|
| Desktop/server (Linux, macOS, Windows) | full support, CI-tested |
WASM (wasm32-unknown-unknown) | engine builds; ≈0.2 MB gzipped harness, in-memory use |
| Mobile (aarch64 iOS/Android) | engine cross-compiles |
WASM persistence (OPFS) and the JS browser binding are planned, not shipped — see the bindings roadmap.
Open your first database in the tutorial.