#documentation #image #showcase #how #demonstration #embed-doc-images #embed-doc-image

yanked embed-doc-image-showcase-test

Showcase for the embed-doc-images crate

1 unstable release

0.1.2 Feb 6, 2024

#5 in #showcase

MIT license

49KB

embed-doc-image-showcase

This crate is a showcase for the embed-doc-image crate.

Please see the documentation on docs.rs to see it in action.


lib.rs:

Showcase for embed-doc-image.

This crate contains no functionality, it is merely a demonstration of how to use embed-doc-image to embed images local to the repository that work across both docs.rs and local documentation. The motivation for this crate is rustdoc's inability to include local images in a way that consistently works across local copies of the repository and docs.rs.

See the documentation for more information. In addition, you are encouraged to browse the source code for this showcase crate to see a fleshed out example of how the solution works.

In addition to serving as a showcase, this crate is used to verify that the solution indeed works across both local installations and docs.rs. This is necessary because a proc macro crate cannot use its own macros in its own documentation.

embed-doc-image should work across the usual web-supported file types (jpg, png, svg, gif, bmp). If you find that it does not work with your files, please file an issue.

The below Ferris images are courtesy of rustacean.net.

![Original Ferris][ferris]

![Ferris making gesture][ferris-gesture]

![Corro][corro]

![Dancing Ferris][dancing-ferris]

Dependencies

~1.5MB
~39K SLoC