svgbobdoc

docs.rs

This crate provides a procedural macro #[svgbobdoc::doc] that renders ASCII diagrams in doc comments as SVG images using [svgbob].

Usage

Add the following line to Cargo.toml.

toml [dependencies] svgbobdoc = "0.1"

Add the attribute #[svgbobdoc::doc] to the items to documentate. Use svgbob code blocks to write ASCII diagrams.

#[svgbobdoc::doc]
/// Some structure.
///
/// ```svgbob
///  .--------------------.
///  | Diagrams here      |
///  `--------------------'
/// ```
pub struct TestStruct {}

See the example directory for a complete example.

Tips

License: MIT/Apache-2.0