Commit 64968ed
authored
Depend on
* Actually, cargo doesn't "mostly just work"
The `DEVELOPING.mkdn` file currently states that `cargo build` and `cargo
test` "mostly just works". Actually, when building Humility for the
first time, they may not just work, if the `cargo readme` cargo
subcommand or `libudev` headers are missing. I've updated the
`DEVELOPING.mkdn` file to state that these dependencies are necessary to
build Humility.
* Depend on `cargo-readme` as a library
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.
* rm duplicate check
* cleanup validation a little bitcargo-readme as a library in build scripts (#444)1 parent 0e6aa42 commit 64968ed
7 files changed
Lines changed: 360 additions & 168 deletions
0 commit comments