Build and run
Recipe | Crates | Categories |
---|---|---|
cargo make | ||
Use devx | ||
Make Rust a Better bash with xshell |
cargo make
[
][cat-development-tools::testing]
cargo make
is a Rust task runner and build tool. The cargo-make
⮳ task runner enables to define and configure sets of tasks and run them as a flow. A task is a command, script, rust code, or other sub tasks to execute. Tasks can have dependencies which are also tasks that will be executed before the task itself.
With a simple toml based configuration file, you can define a multi platform build script that can run build, test, generate documentation, run bench tests, run security validations and more, executed by running a single command.
Install with
cargo install --force cargo-make
cargo make --version
automating-your-rust-workflows-with-cargo-make⮳.
cargo xtask
cargo-xtask⮳ adds free-form automation to a Rust project, a-la make
, npm run
or bespoke bash scripts.
The two distinguishing features of xtask
⮳ are the following:
- It doesn't require any other binaries besides
cargo
⮳ andrustc
⮳, it fully bootstraps from them. - Unlike
bash
, it can more easily be cross platform, as it doesn't use the shell.
Use devx
devx
⮳ is a collection of utilities for writing your own dev scripts in Rust. The project is inspired by and intended for seamless usage with cargo-xtask
⮳ idioms.
devx-cmd
⮳ provides primitives for spawning child processes that are easier than std::process targeted
when used in development scripts. devx-pre-commit
⮳ creates git pre-commit hooks that enforce good practices.
Make Rust a Better bash
with xshell
xshell
⮳ provides a set of cross-platform utilities for writing cross-platform and ergonomic "bash" scripts.
Related Topics
Topic | Rust Crates |
---|---|
General Build Tools | cargo build (built-in) compiles your project. cargo check checks your code for errors without compiling. |
Cross-Compilation | cross ⮳ simplifies cross-compilation. |
Packaging, Distribution | cargo-deb ⮳ creates Debian packages. cargo-rpm ⮳ creates RPM packages. create-dmg creates macOS disk images. |
Build Script Helpers | cc ⮳ helps with compiling C/C++ code in build scripts. pkg-config ⮳ finds system libraries. |
Code Generation | Use build scripts. |
Link-Time Optimization (LTO) Configuration | Configured in Cargo.toml |
Incremental Compilation Management | Handled by cargo directly. |