Expand description
User-facing walkthrough: ../../dmc-docs/dmc-codegen/
Run cargo doc --open -p dmc-codegen for the inline rustdoc.
Codegen layer: turn a parsed Document into renderable output.
Two emitters live here:
HtmlEmitter- static HTML (SSR / SSG output).MdxBodyEmitter- JS body for MDX runtime React rendering.
Both implement NodeSink. A single Walker does one pre-order
DFS, fanning each node to every active sink - no N tree traversals.
Re-exports§
pub use html::HtmlEmitter;pub use html::RenderOptions;pub use html::render_html;pub use html::render_html_with;pub use mdx::MdxBodyEmitter;pub use mdx::render_mdx_body;
Modules§
Structs§
- WalkCtx
- Position info handed to every sink callback.
- Walker
- Pre-order DFS over
doc.children. Sinks fireenterin slice order,leavein reverse (LIFO).Documentis not surfaced as a node event; sinks needing a document boundary subscribe toFrontmatteror their first node.