diff --git a/justfile b/justfile new file mode 100644 index 0000000..d2e9527 --- /dev/null +++ b/justfile @@ -0,0 +1,36 @@ +[private] +default: dev + +# Run the program with optional arguments +dev *args: + cargo run -- {{ args }} + +# Run fmt on Rust source files and TOML files +fmt: + cargo +nightly fmt + fd -e toml -x tombi format --quiet + just --fmt + +# Run clippy on all workspace packages, tests, and examples +clippy: + cargo clippy --workspace --all-targets + +# Run the default build +build: + cargo build + +# Run a release debug build +build-release: + cargo build --release + +# Run a production build with link-time optimization (LTO) +build-production: + cargo build --profile release-lto + +# Install the binary targeting native target-cpu and x86_64-unknown-linux-gnu +install: + RUSTFLAGS="-C target-cpu=native" cargo install --path . --target x86_64-unknown-linux-gnu --profile release-lto --force + +# Clean build artifacts +clean: + cargo clean