use svgbobdoc::transform; #[doc = transform!( /// # My Struct /// /// ```svgbob /// .--------------------. /// | ASCII diagram | /// `--------------------' /// ``` )] pub struct MyStruct; ```
graph TD subgraph "Python (Sphinx)" A1["conf.py\nextensions"] --> B1["sphinx-build"] C1["images/"] -->|"auto-copy"| B1 D1["*.rst: .. figure::"] --> B1 E1["*.rst: .. plot::"] -->|"matplotlib execute"| B1 F1["*.rst: .. svgbob::"] -->|"ASCIIโSVG"| B1 B1 --> G1["HTML + _images/\non ReadTheDocs"] end subgraph "Rust (rustdoc)" A2["Cargo.toml\nfeatures"] --> B2["cargo doc"] C2["lib.rs\nembed_image!"] -->|"base64 encode"| B2 D2["pre-rendered\nPNG files"] --> C2 E2["lib.rs\n```svgbob"] -->|"ASCIIโSVG"| B2 B2 --> F2["HTML with\ndata: URIs\non docs.rs"] end style A1 fill:#e8f5e9,stroke:#2e7d32 style D1 fill:#e3f2fd,stroke:#1565c0 style E1 fill:#c8e6c9,stroke:#2e7d32 style F1 fill:#fff9c4,stroke:#f9a825 style G1 fill:#fff3e0,stroke:#e65100 style A2 fill:#e8f5e9,stroke:#2e7d32 style C2 fill:#e3f2fd,stroke:#1565c0 style E2 fill:#fff9c4,stroke:#f9a825 style F2 fill:#fff3e0,stroke:#e65100