1jehuang/mermaid-rs-renderer ? reverse-engineered prompt
Reverse engineered prompt
Build me a fast Mermaid diagram renderer in Rust that works without a browser.
I want to be able to pass in Mermaid text from a file or from stdin, then render it to SVG by default, and also PNG when I ask for it. It should behave like a simple command line tool, so I can do things like render one diagram to a file, or point it at a Markdown file and have it extract and render the diagrams into an output folder.
It should be really fast for batch jobs and local preview, and it should not depend on Chromium, Puppeteer, or Node. Use native rendering and keep the output clean, with natural sizing unless I explicitly set width or height.
Please support the common Mermaid diagram types like flowcharts, sequence, class, state, and the other standard ones if possible. If there are any current Mermaid syntax details you need, look them up online and make sure the output is solid and compatible.
Are you gonna build this?
make sure you review the code using coderabbit