modelvault (Rust facade)
Application-focused embedded database
Schema-first typed storage for application models. The recommended Rust crate for ModelVault — the database for application models.
- Model-driven schemas — collections from field definitions or
#[derive(DbModel)] - Validation on write — types and constraints enforced before persistence
- Migrations — schema catalog versioning and compatibility helpers
- Nested objects — typed multi-segment field paths
- Single-file deploy — on-disk
.modelvaultor in-memory for tests
Documentation: modelvault.readthedocs.io · rustdoc: docs.rs/modelvault
| Why ModelVault | When to choose ModelVault |
| Quickstart | First collection |
| Why ModelVault | Positioning and design goals |
| Python bindings | Pydantic / dataclass path |
Install
[]
= "0.14"
| Variant | Dependency |
|---|---|
| Engine only (no macros) | modelvault = { version = "0.14", default-features = false } |
| Experimental async | modelvault = { version = "0.14", features = ["async"] } |
Features: derive (default, #[derive(DbModel)]) · async (AsyncDatabase, experimental) — see async policy.
Example
use Cow;
use *;
use FieldPath;
use FieldDef;
use Type;
Output:
opened: :memory:
registered collection id=1 version=1
DbModel and nested schemas: Models & collections
Related crates
| Crate | When |
|---|---|
modelvault-core |
Engine-only or tooling |
modelvault-derive |
Direct proc-macro dependency |
License
MIT — LICENSE