2 releases

0.1.1 Oct 27, 2024
0.1.0 Oct 27, 2024

#347 in Images

Download history 181/week @ 2024-10-23 47/week @ 2024-10-30 11/week @ 2024-11-06 7/week @ 2024-11-27 76/week @ 2024-12-04 53/week @ 2024-12-11 14/week @ 2024-12-18 10/week @ 2024-12-25 68/week @ 2025-01-01 16/week @ 2025-01-08

113 downloads per month

MIT license

2.5MB
2K SLoC

JavaScript 2K SLoC // 0.0% comments Rust 78 SLoC

Rust Mermaid

Rust bindings for mermaid (website), a diagram and flowchart tool that converts a text-based definition into a diagram.

This library exposes the render function that converts Mermaid definitions to SVG.

Installation

To install, run the following command

cargo add mermaid-rs

Usage

use mermaid_rs::Mermaid;

fn main() {
    let mermaid = Mermaid::new().unwrap(); // An error may occur if the embedded Chromium instance fails to initialize 
    println!("{}", mermaid.render("graph TB\na-->b").unwrap());
}

To-do

  • Add support for custom Chromium options
  • Add image comparison tests

Dependencies

~14–30MB
~414K SLoC