A Cargo subcommand that automatically generates a crate's README.md from its Rust documentation.
Cargo rdme is a command-line tool for Rust developers that extracts documentation from a crate's source code and inserts it into the README.md file. It streamlines the process of keeping documentation synchronized between the crate and its public-facing README, ensuring consistency and reducing manual effort.
Rust crate maintainers and developers who publish libraries on crates.io and want to automate the synchronization of their crate's internal documentation with their public README.
Developers choose cargo rdme because it automates the tedious task of manually copying rustdoc to README files, applies intelligent transformations like cleaning up rustdoc syntax and resolving intralinks to docs.rs, and integrates seamlessly into CI pipelines to ensure documentation stays up-to-date.
Cargo command to create the README.md from your crate's documentation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Extracts crate documentation and inserts it into README.md using a simple marker comment, eliminating manual copying and ensuring consistency between internal and public docs.
Transforms rustdoc code blocks by removing hidden lines starting with '#' and adding proper 'rust' tags for syntax highlighting, as demonstrated in the README's comparison table.
Automatically converts crate-internal links like [is_prime](crate::is_prime) to public docs.rs URLs, making documentation links functional and accessible in the README.
Includes a --check flag to verify README freshness in CI pipelines, with exit codes indicating update status, and provides a GitHub Actions example for seamless integration.
Supports a .cargo-rdme.toml file for customizing file paths, line terminators, heading levels, and intralink behavior, offering flexibility for project-specific needs.
Intralink resolution is described as 'best effort' with limitations, such as poor handling of items generated by macros, which can lead to warnings or broken links in the README.
It only works for Rust crates and relies entirely on rustdoc, making it useless for projects in other languages or with alternative documentation systems.
For non-standard setups like workspaces or binary crates, additional configuration via .cargo-rdme.toml is required, adding complexity compared to simpler, zero-config tools.