Rust Max: Tools
- Standard Rust tools:
cargo
rustc
rustup
rustdoc
rustfmt
clippy
just
mdbook
bindgen
miri
- Cargo plugins:
cargo-edit
cargo-clean-all
cargo-deny
cargo-license
cargo-audit
cargo-generate
- More Rust tools:
clippy-control
- Non-Rust tools for Rust:
mold
- More general developer tools:
ripgrep
tokei
basic-http-server
gist
jaq
jsonxf
fd
sd
dust
todo say something here
Standard Rust tools
🌞 cargo
The Rust build and packaging tool.
It is the central tool in most Rust development workflows.
It is part of every Rust toolchain,
usually managed by rustup
.
🌞 rustc
🌞 rustup
🌞 rustfmt
🌞 mdbook
🌞 bindgen
🌞 miri
Cargo plugins
🌞 cargo-edit
Extra cargo
subcommands for editing Cargo.toml
.
cargo install cargo-edit
Installing cargo-edit
provides two cargo
subcommands:
cargo add
was once provided by cargo-edit
but since Rust 1.62.0
is built into cargo
itself.
🌞 cargo-clean-all
🌞 cargo-deny
🌞 cargo-license
🌞 cargo-audit
🌞 cargo-generate
More Rust tools
🌞 clippy-control
Non-Rust tools for Rust
🌞 mold
A high-performance linker that significantly speeds up Rust builds on Linux.
rustmax install-tool mold
Linking is one of the most time-consuming stages of a Rust build,
and it has to be redone every time you test your program.
On Linux the mold
linker is faster than the default linker.
Setting up mold
manually requires configuring .cargo/config.toml
and ensuring the linker is properly installed,
but the Rust Max CLI tool handles this setup automatically.
More general developer tools
🌞 ripgrep
🌞 just
A simple and suprisingly useful command runner with make
-like syntax.
cargo install just
Almost every project has a handful of commands the developer(s)
uses frequently. Put these in a justfile
so the menu of
commands for this project is always obvious, which
can be extra helpful after years away from a project.
just
runs commands listed in a file named justfile
.
The justfile
lives your project's root directory,
and is configured with a make
-like syntax:
default:
just --list
install-tools:
cargo install mdbook
cargo install mdbook-yapp
clean: doc-clean
cargo clean
doc-clean:
rm -rf out
It's a simple idea, but suprisingly useful. And don't worry that it looks like
a Makefile
— it is much more fun and sensible in use than make
.
When you come back to a project and see there's a justfile you
know to run just --list
and you'll immediately see what
was on the previous maintainer's mind.
$ just --list
Available recipes:
build
check
clean
default
doc-book
doc-build
doc-clean
doc-crates
install-tools
lint
maint-audit
maint-duplicates
maint-lock-minimum-versions # useful prior to running `cargo audit`
maint-outdated
maint-upgrade
prebuild
publish
publish-dry
replace-version old new
test
test-min-version-build
$ just build
Compiling rustmax-cli v0.0.5 (…/rustmax/crates/rustmax-cli)
…