rustdoc-assets 0.1.0

Build script helper which copies media and assets from a source directory below your current crate to the target output directory of rustdoc.
docs.rs failed to build rustdoc-assets-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rustdoc-assets-0.2.1

Build script helper which copies media and assets from a source directory below your current crate to the target output directory of rustdoc.

Source: https://mrh.io/cargo-build-images-in-rust-docs/

Example

In Cargo.toml:

[build-dependencies]
rustdoc-assets = "0.1.0"

In build.rs:

# // simulate cargo environment variables so that the test compiles
# std::env::set_var("HOST", "x86_64-unknown-linux-gnu");
# std::env::set_var("TARGET", "x86_64-unknown-linux-gnu");
rustdoc_assets::copy_assets_folder("doc/img");

In the rustdoc comment:

/// <div align="center">
/// <img src="img/it-works.svg" width="200" />
/// </div>