The main facility used for interacting with this project's lifecycle (build/test/format/lint) is cargo-make. Therefore, this is the only dependency you need to install on your machine:
cargo install cargo-make
With cargo-make
, all of this project's commands will become available to you:
cargo make clean # Clean up temporary files
cargo make build # Lint and build the project
cargo make run # Run the application
cargo make test # Run all unit tests
cargo make test-coverage # Run all unit tests and write a code coverage report to STDOUT
cargo make test-coverage-ci # Run all unit tests and write a code coverage report to a text file in LCOV format
cargo make format # Format (rewrite) every applicable file in the project
cargo make format-ci # Format (report only) every applicable file in the project
cargo make lint # Lint (report only) every applicable file in the project
cargo make lint-watch # Lint (report only) every applicable file in the project and re-lints whenever files change
cargo-make
will automatically fetch crates and toolchain components as needed when you run these
commands. Between this and what is defined in Cargo.toml
, you should never need to issue a
cargo install
command unless you are installing new dependencies.
This project uses rustfmt to handle formatting, and
contributions to its code are expected to be formatted with rustfmt
(within reason) using the
settings in rustfmt.toml.
This project uses rust-clippy to handle linting, and contributions are expected to be checked using the settings in clippy.toml.
Note:
rustfmt
andrust-clippy
each have many built-in defaults that will be used in the absence of a corresponding rule inrustfmt.toml
/clippy.toml
.
Code contributed to this project should follow the Rust API Guidelines as much as possible (even if this project is an application rather than a library).