Generation
Code generation framework
The Generation framework produces files from structured inputs. Each generator targets a specific output format and integrates with Bazel for incremental, cacheable builds.
Generators
Web
HTML, CSS, syntax highlighting, and WebAssembly from Rust DSL
Author documentation pages as .document.rs
files using the Composition
trait. The web generator renders complete HTML with automatic table-of-contents, syntax-highlighted code blocks, golden-ratio styling, and optional WASM interactivity.
Autotest
JSON-driven test generation for Rust
Eliminate test boilerplate by generating Rust test functions from templates and JSON case definitions. Write the logic once, define test data declaratively, and produce exhaustive test suites with parameter shadowing and tag organization.
Extract
Code extraction via tree-sitter queries
Pull code snippets from source files at build time using tree-sitter queries. Extracted snippets become constants in generated Rust libraries, keeping documentation in sync with the codebase.
Source
Deploys generated files to the workspace via a manifest-driven copy. Supports verification mode to detect drift between generated output and committed source.
These docs were generated with this framework — authored as
.document.rsfiles and rendered to HTML by the web generator.