Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Supported Diagram Types

Kroki-rs supports a wide variety of diagram types by leveraging existing CLI tools and a high-performance Native Browser Engine.

IDNamePrimary FormatBackend
graphvizGraphvizSVGdot (CLI)
mermaidMermaidSVGNative Engine (Headless Chromium)
bpmnBPMNSVGNative Engine (Headless Chromium)
d2D2SVGd2 (CLI)
ditaaDitaaPNGditaa (CLI)
excalidrawExcalidrawSVGexcalidraw-to-svg (CLI)
vegaVegaSVGvg2svg (CLI)
vegaliteVega-LiteSVGvl2vg & vg2svg (CLI)
wavedromWaveDromSVGwavedrom-cli (CLI)

Native Browser Engine (Mermaid & BPMN)

Starting from v0.0.8, Mermaid and BPMN are rendered using a native headless Chromium instance. This ensures:

High-Performance Font Support

Our Native Engine features a robust font-management system:

  1. Google Fonts: Supported out-of-the-box via internet access in headless mode.

  2. Dynamic Injection: You can inject custom CSS (e.g., @font-face or @import) into the rendering harness at runtime via the window.krokiFontCss configuration.

  3. Consistency: Automatically uses --font-render-hinting=none to ensure pixel-perfect SVG generation across different operating systems.

Installation of Tools

Most tools can be installed via your system package manager.

macOS (Homebrew)

brew install graphviz d2 ditaa
# For Mermaid/BPMN rendering, kroki-rs uses its native engine;
# however, an external browser is recommended for local development:
brew install --cask chromium

Note on Format

While Kroki-rs supports SVG, PNG, and PDF, SVG is the recommended format for most web-based documentation as it provides the best clarity and scalability.