mermaid-rs

Crates.iomermaid-rs
lib.rsmermaid-rs
version0.1.1
sourcesrc
created_at2024-10-27 18:55:53.308072
updated_at2024-10-27 19:11:58.858687
descriptionRust bindings for Mermaid JS
homepage
repositoryhttps://github.com/iwillreku3206/mermaid-rs
max_upload_size
id1424884
size2,600,181
Rinaldo Lee (iwillreku3206)

documentation

README

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
Commit count: 13

cargo fmt