gize-core 0.7.6

Core domain model, conventions and manifest for the Gize framework.
Documentation

gize-core

Core domain model and conventions for the Gize framework.

Crates.io License

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 the gize.toml project manifest, including per-module fields and belongs_to relationships.
  • 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 User maps to the users table (and back) consistently across every generator.

This crate is the abstraction seam that keeps alternative targets feasible (for example a second database or a future non-Axum backend). See ADR-001 and ADR-015.

Usage

[dependencies]
gize-core = "0.7"
use gize_core::ModelSpec;

let spec = ModelSpec::parse("Product", &["name:String".into(), "price:i32".into()])?;
assert_eq!(spec.fields.len(), 2);
# Ok::<(), anyhow::Error>(())

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.