Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9e67ec3
feat(rust): prompt-tier generators, crates.io release path, generator…
dmealing Nov 21, 2026
977e08a
feat(rust): rules-names and contract-types generators (ADR-0067 layer…
dmealing Nov 21, 2026
ca4f6a0
feat(rust): repository generator: data access on sqlx with the guarde…
dmealing Nov 21, 2026
83cb915
test(rust): run the shared persistence corpus through the generated s…
dmealing Nov 21, 2026
b93b298
feat(rust): report shape derivation (FR-044 Table B and C), byte-matc…
dmealing Nov 21, 2026
40869a3
feat(rust): read view-backed projections and reports through the gene…
dmealing Nov 21, 2026
8727cdb
feat(rust): traverse many-to-many relationships through the generated…
dmealing Nov 21, 2026
f2c152d
fix(rust): reconcile the Rust layer generators with main's C# entries
dmealing Nov 21, 2026
336f220
fix(scripts): typecheck rust-release.mjs and carry it into the releas…
dmealing Nov 22, 2026
8f2e40e
feat(rust): run the shared guarded-update persistence scenario throug…
dmealing Nov 22, 2026
c09af2c
feat(rust): service generator over the generated store (ADR-0067 laye…
dmealing Nov 23, 2026
7592c96
Merge origin/main into fm/mo-130-lane-rust-6
dmealing Nov 25, 2026
d178a5d
feat(rust): serve the generated service over HTTP on axum (service-ro…
dmealing Nov 25, 2026
0a37b56
fix(rust): review fixes for the axum transport
dmealing Nov 25, 2026
2297b7d
refactor(rust): one route table for mounting and the collision check;…
dmealing Nov 25, 2026
916a4b5
no-mistakes(review): apply reviewer inline fixes
dmealing Nov 25, 2026
d2f3775
no-mistakes(review): Treat placeholder-name-only route paths as one r…
dmealing Nov 25, 2026
bdbdb93
no-mistakes(review): Restore CLI test suite; fix stale Rust docs
dmealing Nov 25, 2026
3de3a0f
no-mistakes(document): docs: sync Rust port facts after service stack
dmealing Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ first-week wedge plan — and `meta init` picks up from there.
| Kotlin | **Maven Central `8.2.0`** — codegen tier on top of Java: 17 generators (entity, Exposed table, names, relations, repository, output-parser, output-prompt, render-helper, extractor, filter-allowlist, validator, Spring config, storedProc, Spring controller, requirement-tests, api-docs, report-export); 24 / 24 persistence-conformance | [`docs/ports/kotlin.md`](docs/ports/kotlin.md) | [`server/java/codegen-kotlin/`](server/java/codegen-kotlin/) · [`server/java/metadata-ktx/`](server/java/metadata-ktx/) |
| C# | **NuGet `1.2.0`** — loader + conformance + EF Core codegen + render engine + `dotnet meta` CLI all shipped | [`docs/ports/csharp.md`](docs/ports/csharp.md) | [`server/csharp/`](server/csharp/) |
| Python | **PyPI `1.2.0`** — loader + conformance + render + entity-model codegen + ObjectManager runtime shipped; schema migrations in your own tool or the Node `meta migrate` reference helper (ADR-0015) | [`docs/ports/python.md`](docs/ports/python.md) | [`server/python/`](server/python/) |
| Rust | **Crates ready to publish, not yet published** — loader (JSON + YAML), project and source resolution, naming and all 41 validation passes; 584 / 584 metamodel conformance; prompt render and the reply parser (`metaobjects-render`); `cargo meta init` / `gen` / `verify` / `eject` with the `entity`, `client` and `commands` generators (ADR-0065). Schema migrations stay with the Node `meta` tool | [`docs/ports/rust.md`](docs/ports/rust.md) | [`server/rust/`](server/rust/) |
| Rust | **Crates ready to publish, not yet published** — loader (JSON + YAML), project and source resolution, naming and all 41 validation passes; 584 / 584 metamodel conformance; prompt render and the reply parser (`metaobjects-render`); `cargo meta init` / `gen` / `verify` / `eject` with eleven generators — the model crate through the sqlx store, the service and its opt-in axum routes (`service-routes`) to a typed client and its commands (ADR-0065). Schema migrations stay with the Node `meta` tool | [`docs/ports/rust.md`](docs/ports/rust.md) | [`server/rust/`](server/rust/) |

## Capability matrix

Expand Down Expand Up @@ -336,7 +336,7 @@ metaobjects/
│ ├── java/ # Java port (incl. codegen-kotlin + metadata-ktx)
│ ├── csharp/ # C# port
│ ├── python/ # Python port
│ └── rust/ # Rust port (ADR-0065 — crates not yet published; cargo meta + entity/client/commands generators)
│ └── rust/ # Rust port (ADR-0065 — crates not yet published; cargo meta + eleven generators through the axum transport)
│
└── client/
└── web/ # universal browser packages (React, TanStack, Angular, framework-agnostic)
Expand Down
6 changes: 6 additions & 0 deletions changelog.d/rust-crates-release-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- **The Rust crates join the release path (ADR-0065 Amendment 3).** The workspace version moves to
the shared line (1.3.0), and `scripts/release.mjs` publishes the four crates to crates.io after
npm, behind the same confirm, in dependency order, when a file they ship changed since the last
`rust-v*` tag (or they never shipped, or `expected-registry.json` moved); `--crates=publish|skip`
overrides. Its preflight checks the crates.io token and that the version is free before anything
is bumped. `docs/RELEASING.md` names crates.io as the fifth registry. Nothing is published.
16 changes: 16 additions & 0 deletions changelog.d/rust-generators-own-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- **Rust generators own their layout, take options and expose their parts (ADR-0063).** A
layout ratchet (`tests/layout_ratchet.rs`) parses every generator source with `syn` and fails
on a hand-typed line break or indentation run; its allowlist can only shrink, and it starts
empty but for six files whose strings are not generated code. Eight `rust` writer-conformance
cases pin the dialect (`use_list`, `doc`, `prose`, `doc_break`, `assign`), each a rustfmt fixed
point under the generated crates' `rustfmt.toml`. An entry in `metaobjects.config.json`'s
`generators` may now be `{"name": ..., "options": {...}}`: `Generator::configure` receives the
options, and the shipped generators take none and refuse any key with
`ERR_UNKNOWN_GENERATOR_OPTION`, also on a run `--generators` narrows. Each shipped generator
has a `*Parts` trait — eleven in all once the layer generators landed (`EntityParts`,
`ClientParts`, `CommandsParts`, `RenderHelperParts`, `OutputParserParts`, `OutputPromptParts`,
`RulesNamesParts`, `ContractTypesParts`, `RepositoryParts`, `ServiceParts`,
`ServiceRoutesParts`) — with one default method per output piece, so an owned
generator overrides one piece and keeps the rest. Generated output is byte-identical but for
one fix: `assign` now moves an array right-hand side to the next line when that is where
rustfmt puts it under those settings.
7 changes: 7 additions & 0 deletions changelog.d/rust-many-to-many-traversal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- **Rust port: many-to-many relationships are traversed (FR-018).** A many-to-many relationship
of a keyed entity gets `<relation>_of` in its store module, the related rows read through the
junction in one statement (hetero, directed self-join and `@symmetric` self-join, which keeps a
row relating a record to itself). The junction's keys come from the same derivation the loader's
pairing rule runs, now a public function of the core crate (`derive_m2m_fields`). The persistence
runner runs all 56 scenarios on Postgres, `guarded-update` among them (`meta_store::transition`
takes a transition's `@condition` and ANDs it into the same statement), and its ledger is empty.
9 changes: 9 additions & 0 deletions changelog.d/rust-prompt-tier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- **Rust port's prompt tier: `render-helper`, `output-parser` and `output-prompt`.** Three
generators put the `metaobjects-render` crate (render, the strict JSON parse and the tolerant
`extract`, the output-format fragment) behind typed functions, held to the render,
template-output and extract corpora. They write a crate each beside the model crate:
`<package>_prompts` (a typed render function per prompt), `<package>_parsers` (`parse_<prompt>`
for a JSON reply, `extract_<prompt>` for any, and the extract schema) and `<package>_formats`
(the fragment and its descriptor), for every prompt with a `@responseRef` (ADR-0052). `eject`
copies all three, and `gen` checks each body against its payload before it writes a render function.
The generated crates depend on `metaobjects-render` at this release's major and minor.
10 changes: 10 additions & 0 deletions changelog.d/rust-reports-projections-read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- **Rust port: reports and projections are read (FR-044, ADR-0028).** The core crate derives a
report's fields (`metaobjects::report_shape`, FR-044 Table B and C) byte for byte with
`report-shapes.json`. A served read (a concrete projection or report whose read source is a view)
gets a read-only struct in its model crate and a read-only module in its store crate: `list`,
`count`, and `get` for a projection with a key. A view's numbers are read through a cast to their
field's type, since the view's SQL picks the column type. The persistence runner now runs the 24
report and 3 projection scenarios, and its ledger holds only the three many-to-many ones. A
view-backed projection that an operation returns is now the model crate's type, not a copy in
the contract crate. Clients and commands for read models wait for a Rust transport that serves
them.
12 changes: 12 additions & 0 deletions changelog.d/rust-repository-generator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- **Rust port's data access: the `repository` generator (ADR-0067 layer 3).** It writes a
`<package>_store` crate per package with a stored entity, on sqlx, for Postgres and SQLite: per
entity the table mapping and typed `list` (the nine filter operators, sort, paging), `count`,
`get`, `create`, `update` and `delete`, and per lifecycle the guarded update
`transition_<field>(id, from, to)`, one conditional `UPDATE` that answers `false` when another
writer moved the row first (ADR-0066 §6). The shared `meta_store` crate holds the statements and
the decode of each column into the model's own types. A single-table subtype writes its
discriminator and reads only its own rows. A Rust runner for the shared persistence corpus runs
it on a throwaway Postgres: every list, get, count, create, update, delete, roundtrip and
single-table scenario passes; the many-to-many, projection and report scenarios are on its
shrink-only ledger, because projections, reports, many-to-many traversal and flattened storage
are not stored yet.
14 changes: 14 additions & 0 deletions changelog.d/rust-rules-names-contract-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- **Rust port's rules layers 0 and 1: `rules-names` and `contract-types` (ADR-0067).** Two
generators read the business-rules vocabulary, and each writes nothing for a model without it.
`rules-names` writes a `<package>_rules` crate for a package with a lifecycle or a declared
operation: per entity, each lifecycle's state type (the model's own enum), its states, initial
and terminal states and its transitions, and the commands derived from unclaimed transitions;
then the package's operations (kind, permission, claimed transitions, business errors), every
permission asked about (declared or derived per ADR-0066) and every business error, each as a
closed enum, plus the five codes the enforcing shell answers with. `contract-types` writes a
`<package>_contract` crate for a package with a declared operation: each operation's input and
output types, its business-error enum and its error body (a fixed wire code or one of its own),
the read shape of a projection it returns, and a shared `meta_contract` crate with the wire
error codes, their statuses and the validation and constraint-violation bodies. An entity's
read, create and patch shapes stay in the model crate, which carries no persistence mapping.
Both are listed in the shared generator registry (Rust only for now) and `eject` copies them.
19 changes: 19 additions & 0 deletions changelog.d/rust-service-generator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- **Rust port: the `service` generator (ADR-0067 layer 4, ADR-0066 §6).** It writes a
`<package>_service` crate per package with a stored entity: `<Pkg>Service`, generic over the
database pool (Postgres or SQLite) and the actor type, with each derived list (page size 50 unless
`api.pagination` says otherwise, `withCount` for the total), get, many-to-many traversal, create,
update and delete, a command per transition that derives one, and a shell per declared command
and query. Every write runs in one sqlx transaction, or inside a caller's through its `_in` twin,
and runs ADR-0066's checks in order: the row (404), the permission point (403 `forbidden`), the
state (409 `invalid_transition`), the hand-written body, the guarded update (409
`invalid_transition` or `transition_condition_failed`) and the event hook. The generic update
answers a changed lifecycle field 409 `state_managed`, a create starts in the initial state, and
`@autoSet` timestamps are stamped by the service (ADR-0045 Amendment 1). What an app writes are
traits: `<Pkg>Policy`, `<Pkg>Bodies` (a command answers the move to make or none, and
`BodyError::Business` a declared error), `<Pkg>Hooks` (one `before` and one `after`, told of
the write by the `<Pkg>Before` and `<Pkg>After` enums) and `<Pkg>Events`, the last two with
defaults. The shared `meta_service` crate holds the error codes and statuses. A probe runs the
rules corpus's scenarios through the service on SQLite, with the settings variants checked in
the generated text; the HTTP transport, and the shared API tests over it, come next. The walks
the layer generators share moved into a new engine module, `metaobjects_codegen::layers`, so an
ejected `service` or `repository` calls the same walk the shipped one does.
17 changes: 17 additions & 0 deletions changelog.d/rust-service-routes-transport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- **Rust port: the service is served over HTTP (`service-routes`, ADR-0067 layer 5, ADR-0065
Amendment 7).** A new opt-in generator writes a `<package>_http` crate per package and the shared
`meta_http` crate: `router(service, actor)` returns an axum `Router` over the generated service,
with the derived CRUD, traversal, transition-command and declared-operation routes, the
REST-standard list query (filters with `or`/`and` groups, search, `sort=<field>:asc|desc`, a
default page of 50, `withCount`) and the named 400s. `ActorSource` (or `ActorFn` over the
headers) is the app's authentication, handed to the service untouched. It runs only when
`metaobjects.config.json` lists it: `cargo meta init --transport` adds it, a plain `init` and a
project with no list leave it out, and `gen --list` marks it `[opt-in]`. A credential field (one
with a password view) is never returned. An entity with a read-only view beside its table is
written to the table and read back through the view, so its derived fields are in every answer
(the store's `Table` gains `read`). A field with no `@sortable` is now sortable when it is
filterable, as in TypeScript, so a generated client's sort allowlist can grow: regenerate.
The api-contract corpus runs over HTTP in Rust's generated lane (`core`, `write-through`,
`secret-fields`, `list-query`, `rules` and its settings variants, 77 scenarios; the rest
ledgered), the list-query corpus runs all 95 cases, and `examples/rust-service/` is a whole
tasks service built this way, checked by the `rust` lane.
Loading
Loading