langston-barrrett.github.io
cargo-careful
cargo careful is a tool to run your Rust code extra carefully -- opting into a bunch of nightly-only extra checks that help detect Undefined Behavior, and using a standard library with debug assertions.
Also can enable sanitizers.
Miri is more comprehensive, but works on less code.
See also High Assurance Rust.
In Gitlab CI
- rustup toolchain install nightly
- rustup default nightly
- cargo +nightly install cargo-careful
- cargo +nightly careful build -Zcareful-sanitizer=address --target=x86_64-unknown-linux-gnu
- cargo +nightly careful test -Zcareful-sanitizer=address --target=x86_64-unknown-linux-gnu
(TODO: cargo-careful
now published pre-built binaries, adapt the above to
use them!)