Skip to main content

Crate dmc

Crate dmc 

Source
Expand description

User-facing walkthrough: ../../dmc-docs/dmc-core/ Run cargo doc --open -p dmc-core for the inline rustdoc. Orchestrator: lex -> parse -> transform -> codegen pipeline plus a multi-file engine that processes whole collections per a velite-style config. See crate::engine::compile::Compiler::compile for single-source use; crate::Engine::run for batch builds.

Re-exports§

pub use engine::Engine;

Modules§

ast
cli
engine
loaders
Per-extension loaders: bytes -> Loaded { data, content } for schema validation. MatterLoader runs the full mdx compile; YamlLoader / JsonLoader parse data files directly.

Structs§

MermaidOptions
Top-level mermaid configuration. Single flat object - every mermaid.initialize() knob (themeVariables, flowchart, sequence, gantt, look, layout, …) lives at the same level as the dmc-side rendering knobs (responsiveSvg, centerLabels, outputDir, …). All fields are typed end-to-end; no serde_json::Value catch-all.
PrettyCodeOptions
Top-level pretty-code configuration. Stored on CompileConfig as Option<PrettyCodeOptions>; None means “use built-in defaults”.

Enums§

MermaidThemeMode
Mermaid theme spec. Either a single theme name (renders once, attaches one chartSvg attr) or a map of mode -> theme name that renders per-mode and attaches one ${mode}Svg attr per entry.
PrettyCodeTheme
Pretty-code theme spec.

Functions§

parse
Lex + parse in one shot, dropping all diagnostics. Tests + the parse bin; production callers should construct their own DiagnosticEngine.