Expand description
ariel-rs — a pure-Rust Mermaid diagram renderer.
Converts Mermaid diagram source text into SVG strings without requiring a JavaScript runtime or browser.
§Quick start
let svg = ariel_rs::render("graph LR\n A --> B", ariel_rs::theme::Theme::Default);
assert!(svg.contains("<svg"));The two entry points are render and render_svg (an alias). Both
accept any supported Mermaid diagram type and a theme::Theme variant.
For a fallible variant that returns RenderError instead of an error SVG,
use try_render.
Re-exports§
pub use error::ParseError;pub use error::ParseResult;pub use error::RenderError;
Modules§
- error
- Error and parse-result types for ariel-rs diagram parsing and rendering.
- theme
- Colour-theme types for Mermaid diagram rendering.
Structs§
- Render
Options - Per-call rendering configuration passed to
render_with_optionsandtry_render_with_options.
Enums§
- Diagram
Type - The type of a Mermaid diagram, as detected from the source text.
Functions§
- detect
- Detect which
DiagramTypea Mermaid source string represents. - render
- Render any Mermaid diagram source to an SVG string.
- render_
svg - Alias for
render— renders any Mermaid diagram source to an SVG string. - render_
with_ options - Render any Mermaid diagram source to an SVG string using
RenderOptions. - try_
render - Render any Mermaid diagram source to an SVG string.
- try_
render_ with_ options - Render any Mermaid diagram source to an SVG string using
RenderOptions.