Skip to content

piercypixel/zero2prod

Repository files navigation

zero2prod

Setup

Rust Toolchain

Install Rust using rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Add required components (for minimal profile):

rustup component add clippy
rustup component add rustfmt

Development Tools

cargo install cargo-watch
cargo install cargo-tarpaulin  # Linux x86_64 only
cargo install cargo-audit

Development

Build

cargo build

Run

cargo run

Watch Mode

Execute cargo commands on every file change:

cargo watch -x check

Run check, test, and run on file changes:

cargo watch -x check -x test -x run

Testing

cargo test

Code Coverage

cargo tarpaulin --ignore-tests

Note: tarpaulin only supports x86_64 CPU architectures running Linux.

Linting

cargo clippy

Fail on any warning:

cargo clippy -- -D warnings

Formatting

cargo fmt

Check formatting (CI):

cargo fmt -- --check

Security Audit

Scan for known vulnerabilities:

cargo audit

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages