Crates.io | mermaid-rs |
lib.rs | mermaid-rs |
version | 0.1.1 |
source | src |
created_at | 2024-10-27 18:55:53.308072 |
updated_at | 2024-10-27 19:11:58.858687 |
description | Rust bindings for Mermaid JS |
homepage | |
repository | https://github.com/iwillreku3206/mermaid-rs |
max_upload_size | |
id | 1424884 |
size | 2,600,181 |
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.
To install, run the following command
cargo add mermaid-rs
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());
}