docima
Generate images at build time for embedding in the Rust documentation.
Usage
- First configure your build script to generate the images in the desired path.
They will be encoded as
png→base64and saved asHTMLtags. E.g.:
generate_image?;
- Include your image in the Rust documentation by using the doc attribute and the include_str macro.
- Generate the docs:
You can refer to the crate documentation for more details. And there's also a full practical example available.