Announcing embed-doc-image: embed local images in Rust documentation and have them work across both local installations and docs.rs

Crates.io: https://crates.io/crates/embed-doc-image
Docs.rs: https://docs.rs/embed-doc-image

I recently ran into this issue when I wanted to include some images of geometric conventions in a scientific library. It annoyed me to no end that there is no proper way to embed images so that they work both in local docs and docs.rs. This crate strings together some workarounds and packages them up into a palatable solution that hopefully can tide us over until rustdoc gets proper support for this.

3 Likes