Skip to content
Ferrigura

Mermaid diagrams, rendered in Rust.

Turn diagram text into standalone SVG for your documentation, application or build. Ferrigura runs without a browser process and embeds the fonts it uses, while keeping labels as selectable text. Start with the Rust library or the command-line tool.

A diagram your build can produce.

Render in a native process and keep the SVG alongside your other build artifacts. No headless browser needs to start, and the result can travel with the page or document that uses it.

Use it from the command line
Version
0.3.0

Labels stay text. Fonts travel with them.

Text is measured with bundled fonts, then the glyphs it needs are embedded in the SVG. Labels stay selectable and searchable, with line breaks tied to the same typography the viewer receives.

Understand the output contract

A few lines become a diagram.

Choose a flowchart, sequence or state diagram. Each preview is SVG generated by Ferrigura’s native CLI from the source beside it.

Mermaid source
flowchart TD
  draft[Draft] --> review{Review}
  review -->|Approved| publish[Publish]
  review -->|Changes| draft
Native SVG output

Open the SVG at full size

The examples use the renderer’s light scheme and embedded font subsets. The website switches between build-time outputs; it runs no diagram renderer in your browser.

Familiar diagram text. Explicit rendering choices.

Ferrigura ports Mermaid 12.2.0. Its type reference documents the supported syntax, layout and limits for each diagram.

Diagrams for different questions

Flowcharts, sequences, classes, states and entity relationships sit alongside the other supported diagram types.

Geometry checked against Mermaid

The verification harness compares parser models and rendered geometry with the pinned upstream implementation in Chromium.

One renderer, many inputs

Reuse resolved configuration across diagrams. Give inline SVGs unique IDs so their styles and references stay scoped.

Repeatable output

Fixed randomness and per-render state support reproducible output. For gantt diagrams that depend on today, Rust callers supply the clock explicitly.

Choose it with the boundaries in view.

Ferrigura produces SVG. Labels use SVG text rather than HTML, and the renderer has no browser callbacks or tooltips. Math labels, hand-drawn strokes, classic themes and some font coverage are outside the supported scope.

The Node.js addon can be built from the repository; its prepared @ferrigura/core package is not available from npm. Ferromark’s optional adapter renders Mermaid fences in custom builds, alongside its Markdown renderer.

Read the specific limitations

Add rendering to your Rust application.

Pass diagram text and configuration to the library. Reuse a renderer when you have several blocks to process.

Add the library
cargo add ferrigura
Start with Rust

Give your build an SVG file.

Use the native CLI with files or standard input. Render several inputs into an output directory with one command.

Install the command-line tool
cargo install --locked ferrigura-cli
Start with the CLI