flowmaid 0.20.1

Mermaid-like diagram engine in pure std Rust (flowcharts, ER, UML class, sequence, pie, state, mindmap & user-journey diagrams): hand-written parser, Sugiyama-style layout, SVG renderer, and an interactive scene API for drag-and-drop apps. Zero dependencies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Render one .mmd file to SVG on stdout: `cargo run -q --example svg -- file.mmd`
use std::io::Read;
fn main() {
    let path = std::env::args().nth(1).expect("usage: svg <file.mmd>");
    let mut src = String::new();
    std::fs::File::open(&path).unwrap().read_to_string(&mut src).unwrap();
    match flowmaid::render_svg(&src) {
        Ok(svg) => print!("{}", svg),
        Err(e) => { eprintln!("error: {:?}", e); std::process::exit(1); }
    }
}