Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit changes the `cargo xtask readme` xtask and the `humility-cmd-doc` build script to depend on `cargo-readme` as a library crate and call into its `generate_readme` function, rather than using it as an external binary that's invoked using `std::process::Command`. This way, the `cargo-readme` binary no longer needs to be installed using `cargo install` in order to build Humility instead, it's just a normal Cargo package dependency. In addition to making the first-time build experience a bit smoother by reducing the number of external dependencies that need to be installed, this also means our `cargo-readme` dependency is now a normal versioned crate dependency. That ensures that everyone developing Humility gets the `cargo-readme` version present in the lockfile, ensuring that `cargo-readme` generates consistent output. Installing the binary using `cargo-install` doesn't provide that guarantee, as it's not versioned, so if upstream changed their output format, the generated docs might change unnecessarily between different development systems with different `cargo-readme` versions installed.
- Loading branch information