← Back to context

Comment by _flux

13 hours ago

Seems like Mermaid parsing and layout would be a useful crate as by itself. I would enjoy a fast mermaid layout command line tool with svg/pdf/png support, which I think would be quite feasible to implement with such a crate.

This is exactly the plan for v0.3.0! Extracting the ~7000 line Mermaid renderer into a standalone crate with SVG/PNG output and CLI support. Pure Rust, WASM-compatible. Stay tuned!

  • That's great! I'm pretty interested in that. I hooked up `mark` [1] at work to upload md files to our internal confluence and would love to integrate a native tool to convert Mermaid diagrams to a png rather using mark's built-in system which calls out to mermaid.js and thus needs us to vendor chromium, which I'd rather avoid!

    [1] https://github.com/kovetskiy/mark