Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Changelog

0.1.0 — 2026-12-01

First public release on crates.io: zyvor and zyvor-cli.

Schema & CLI

  • Schema language, lexer, parser, AST, semantic validator
  • init, dev (watch + debounce), generate, validate, migrate, migrate --apply
  • .env / config.toml / env-var / CLI-flag configuration with priority resolution
  • .gitignore generation to protect credentials
  • Shared naming module (pluralized snake_case tables, snake_case columns)

Code generation

  • Modular output: one folder per model (mod.rs + types.rs)
  • Entity, model, typed fields, relation metadata and loaders
  • Create / Update structs with InsertData / UpdateData impls
  • Serialize / Deserialize / FromRow derives
  • @map → #[sqlx(rename)], @@map → table override
  • Option<Option<T>> nullable update semantics
  • #[serde(skip)] on back-references to prevent recursive serialization

Migrations

  • Initial CREATE TABLE IF NOT EXISTS with keys, indexes, FKs, ON DELETE
  • _zyvor_migrations tracking table with checksums
  • Idempotent re-apply, schema-drift detection
  • Snapshot-based diffing (ADD COLUMN, DROP COLUMN, dropped tables)
  • Auto-numbered incremental migrations
  • Automatic database creation if the target doesn’t exist

Runtime

  • Query builder: WHERE, ORDER BY, LIMIT/OFFSET, DISTINCT, GROUP BY, HAVING, IN, aggregates, subqueries with bind propagation
  • Joins: INNER, LEFT, RIGHT, FULL, CROSS, multiple joins
  • Relations: 1:N, N:1, 1:1, M:M with .with() and .with_nested()
  • CRUD + bulk CRUD, pools and transactions
  • BindValue layer with explicit SQL NULL semantics
  • Wrapper types: DateTime, Decimal, JsonValue
  • Send + Sync throughout for async frameworks

Verification

  • 115 runtime tests, 64 CLI tests, clippy clean at -D warnings
  • Axum E2E verified: CRUD, 1:N, N:1, 1:1, M:M, 2-level nested eager loading, 404 / 409 / 422 handling, cascade delete

Known limitations

PostgreSQL only · sqlx must be 0.8 · no rollback · no typed error enum · no composite PK/FK codegen · scalar arrays rejected by CRUD generation · literal defaults still required in Create · Update has no Default derive · DateTime is TIMESTAMP without timezone

See Known Limitations for the full list.

Planned for 0.1.1

  • Default on Update structs
  • Typed error enum
  • migrate status

0.1.1 — 2026-12-02

Metadata and ergonomics patch. No breaking changes.

Fixed

  • Corrected repository URLs on crates.io (previous links pointed to a non-existent GitHub account)
  • zyvor validate and zyvor generate now default to .zyvor/schema.zyvor instead of the legacy rust.schema
  • zyvor migrate now writes to .zyvor/migrations/ so migrate --apply finds the generated file
  • Corrected the output path printed by zyvor generate

Added

  • keywords, categories, homepage, documentation metadata on both crates
  • rust-version = "1.85" (edition 2024 requirement made explicit)
  • LICENSE-MIT and LICENSE-APACHE files
  • Documentation book: https://fakhir-israr-200219.github.io/zyvor-doc/