anda_db_derive
anda_db_derive is the procedural-macro layer of the AndaDB workspace. It
turns ordinary Rust structs into AndaDB schema definitions, reducing boilerplate
and keeping application data models aligned with the database type system.
What This Crate Provides
AndaDBSchemafor generating a completeSchemaFieldTypedfor generating nestedFieldTypedescriptions- support for
#[field_type = "..."]overrides - support for
#[unique]and#[serde(rename = "...")] - extraction of doc comments into schema field descriptions
When to Use It
Use anda_db_derive when you want to:
- define collection schemas from Rust structs instead of building them manually
- keep application models and storage schemas synchronized
- generate nested map-like field types from user-defined structs
- reduce repetitive schema boilerplate in embedded database code
Getting Started
Add the derive crate alongside anda_db_schema:
[]
= "0.4"
= "0.4"
= { = "1", = ["derive"] }
Typical usage:
use AndaDBSchema;
use ;
Technical Reference
Deep technical documentation for this crate lives in:
Related Crates
anda_db_schemafor the underlying schema and document typesanda_dbfor the embedded database that consumes generated schemas
License
MIT. See LICENSE.