SSR docs declare the embedded-V8 architecture; surface re-chartered per appeal

docs/SSR_ARCHITECTURE.md now specifies the decided shape: Django template
backend rendering through the PyO3-bound SsrEngine (cores/mizan-rust-ssr,
deno_core + deno_web), bundles built by mizan-generate, props crossing as
parsed values, no external JS runtime serving requests, no_rsc guard.
docs/AFI_ARCHITECTURE.md follows (mizan-rust-ssr in the cores layout, Bun
worker delisted). OWED_SURFACE.md regenerated via appeal-surface: the
Bun→PyO3 cutover, the PyO3 binding surface, and the mizan-generate SSR
bundling step are now chartered owed mechanisms instead of an orphaned
engine crate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-05 19:43:16 -04:00
parent 81ea0cea9f
commit e4091dfbe8
3 changed files with 93 additions and 65 deletions

View File

@@ -28,20 +28,21 @@ cores/ shared language-level primitives
mizan-python/ @client decorator, registry, MWT, HMAC cache keys
mizan-rust/ Rust core — IR build (build_ir()), registry
mizan-rust-macros/ #[derive(Mizan)] / #[mizan::client] proc-macros
mizan-rust-ssr/ embedded-V8 SSR engine (deno_core + deno_web); evals the
build-time bundle, renders per request; no_rsc guard
protocol/ protocol-level tooling
mizan-codegen/ codegen — Rust binary (crate `mizan-codegen`); reads KDL IR,
emits typed clients. Targets: stage1, react, vue, svelte,
channels, python, rust. Askama templates under templates/.
mizan-generate/ thin npm-package launcher (bin/launcher.mjs) dispatching to
the compiled mizan-codegen binary per platform
workers/ runtime workers / bridges
mizan-ssr/ Bun subprocess used by the Django template backend
```
## Two orthogonal products
- **RPC** — typed client generation via codegen
- **SSR** — server rendering via the Bun bridge
- **SSR** — server rendering via the embedded-V8 engine in the Rust
binary (see `docs/SSR_ARCHITECTURE.md`)
Independent and composable. Either ships standalone; together they
compose.
@@ -68,9 +69,9 @@ contexts, types, and invalidation graph. Every codegen target consumes
KDL. KDL is the contract; everything else (REST envelopes, OpenAPI
documents, framework idioms) is sediment around it.
The IR must be validated against multiple adapters before it is
considered stable. Single-adapter validation hides assumptions —
divergence between adapters is what the IR exists to prevent.
The IR is validated against multiple adapters — single-adapter
validation hides assumptions, and divergence between adapters is what
the IR exists to prevent.
Forward-direction primitives:
@@ -85,17 +86,16 @@ Forward-direction primitives:
- `protocol/mizan-codegen/src/fetch.rs` spawns the configured source
command and parses the KDL it writes.
- Codegen reads KDL directly — no OpenAPI envelope, no
`openapi-typescript`, no per-backend converter divergence. The
former JavaScript/Node two-stage codegen (`openapi-typescript` plus
`.mjs` adapters) has been deleted; codegen is now the single Rust
binary.
`openapi-typescript`, no per-backend converter divergence; codegen
is a single Rust binary.
- Edge manifest, MWT claims, and other protocol artifacts derive from
the same registry/IR.
## Launch surface
## Authoring surface
Python (Django) + React. Vue and Svelte ship as v1 alongside React.
TypeScript backend (`mizan-ts`) proves the protocol is portable.
Python (Django) + React is the reference stack. Vue and Svelte are
co-equal codegen targets over the same kernel. The TypeScript backend
(`mizan-ts`) proves the protocol is portable.
## Why the AFI shape