gize-core
Core domain model and conventions for the Gize framework.
gize-core is the framework-agnostic heart of Gize. It knows nothing about Axum, SQLx, or
the CLI; it only defines the shared vocabulary the rest of the workspace builds on:
Manifest,Module,Relation: the typed representation of thegize.tomlproject manifest, including per-module fields andbelongs_torelationships.ModelSpec,Field,FieldType: how a model and its fields are described, with the Gize-type to Rust-type to SQL-type mapping.Dialect: the database seam (PostgreSQL and SQLite), which centralizes column types, primary-key generation, bind placeholders and integrity-error codes.- Naming conventions: pluralization and snake/Pascal case helpers so
Usermaps to theuserstable (and back) consistently across every generator.
This crate is the abstraction seam behind the three supported databases (PostgreSQL, MySQL and SQLite) and what keeps a future non-Axum backend feasible. See ADR-001 and ADR-015.
Usage
[]
= "0.9"
use ModelSpec;
let spec = parse?;
assert_eq!;
# Ok::
Part of the Gize workspace
| Crate | Role |
|---|---|
gize-core |
Domain model, manifest, dialect, conventions (this crate) |
gize-generator |
Codegen engine: safe writer, sync, plugins |
gize-templates |
Templates for the generated code |
gize-db |
Migrations (PostgreSQL and SQLite) |
gize-openapi |
OpenAPI spec generation |
gize-admin |
Admin UI generator |
gize-testing |
Test utilities for generated apps |
gize |
The gize CLI |
License
Licensed under either of Apache-2.0 or MIT at your option.