Publish your crate to crates.io to automatically generate and host documentation on docs.rs.
Publish documentation to docs.rs by running cargo doc locally to verify, then pushing your crate to crates.io with cargo publish, which automatically triggers docs.rs to build and host the documentation.
cargo doc --no-deps
cargo publish
Ensure your Cargo.toml includes a documentation URL pointing to https://docs.rs/YOUR_CRATE_NAME after the first successful publish.
docs.rs automatically builds and hosts your Rust crate's documentation whenever you publish a new version to crates.io. You don't need to manually upload files; just publish your code as usual, and the site handles the rest. Think of it like a library that automatically prints and shelves your book every time you release a new edition.