BADASCII For RustDoc
Use badascii
as a macro, and inject cool SVG diagrams into your
rustdoc
, or wherever you might need them in your rust code.
Using it is super simple.
cargo add badascii-doc
And then in your code, simply use
And you will get a nice SVG rendering in your generated markdown. The SVG generated by these macros is meant to be theme-agnostic. They look like this:
If you prefer a more formal diagram use the
badascii_formal!
macro, which gives straight
lines and no backtalk.
If you are worried about compile time performance,
well, then you can use badascii-cli
to process
the comments yourself and generate svg
images.