Install
corvid is consumed four ways:
- From Rust — crates.io, package
corvid-db:corvid-db = "0.4"with theuse corvid::…ident. - 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 a published language binding —
corvid-nodeandcorvid-json npm,corvid-pythonon PyPI,corvidon pub.dev,corvid/php-corvidon Packagist (installed with PIE), andio.github.corvid-db:corvid-jvm(JVM) plusio.github.corvid-db:corvid-android(the Android AAR) on Maven Central. On Apple platforms, corvid-swift installs by Swift Package URL (the tag is the release):.package(url: "https://github.com/corvid-db/corvid-swift.git", from: "0.4.1"). The full matrix — including the artifact-consuming C/Go/C++/Zig bindings — is the bindings overview. - In the browser —
npm i corvid-js: the engine compiled to wasm, synchronous in-memory OOP plus async OPFS persistence (see corvid-js).
Rust (crates.io)
Section titled “Rust (crates.io)”[dependencies]corvid-db = "0.4" # the crate ident stays `corvid`: use corvid::…For pinned, reproducible builds (recommended while pre-1.0), pin the git dependency to an exact release tag instead:
[dependencies]corvid-db = { git = "https://github.com/corvid-db/corvid", tag = "v0.4.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-db = { features = ["zstd"] } |
tracing | Structured instrumentation events at the engine’s load-bearing points, for any tracing-compatible subscriber. | corvid-db = { 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
Since v0.4.1 the mobile sets ship on the same releases: the Android
cdylib archives for aarch64-linux-android (arm64-v8a) and
x86_64-linux-android (same tarball shape — cdylib + corvid.h +
golden fixtures; consumed by the corvid-android AAR) and the
corvid-swift-<tag>.zip holding the CorvidEngine.xcframework
(iOS device + fat iOS-simulator + fat macOS staticlib slices) that the
corvid-swift SPM package pins as its binary target.
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). Publishing is automated via npm
trusted publishing — no registry tokens involved.
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) + browser | shipped via corvid-js: in-memory sync surface + OPFS persistence (Chromium CI-enforced; Firefox/Safari supported by the OPFS baseline) |
| Mobile (aarch64 iOS/Android) | engine cross-compiles |
Open your first database in the tutorial.