chore: add justfile

This commit is contained in:
2026-01-27 13:14:33 +02:00
parent 77b611b0fa
commit e7c97070ca

57
justfile Normal file
View File

@@ -0,0 +1,57 @@
# Default recipe
default:
@just --list
# Run all checks (fmt, clippy, docs, test)
check: fmt clippy docs test
alias f := fmt
# Format code
fmt:
cargo fmt --all
# Check formatting without modifying
fmt-check:
cargo fmt --all -- --check
# Run clippy
clippy:
cargo clippy --all-targets --all-features -- -D warnings
alias d := docs
# Build documentation
docs:
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
alias t := test
# Run tests with nextest
test:
cargo nextest run --all-features
cargo test --doc
alias b := build
# Build release binaries
build:
cargo build --release
# Run server (default: x25519 on localhost:4433)
server mode="x25519" listen="127.0.0.1:4433":
cargo run --release --bin server -- --mode {{mode}} --listen {{listen}}
# Run benchmark runner
runner server mode="x25519" payload="1024" iters="100" warmup="10":
cargo run --release --bin runner -- \
--server {{server}} \
--mode {{mode}} \
--payload-bytes {{payload}} \
--iters {{iters}} \
--warmup {{warmup}}
alias c := clean
# Clean build artifacts
clean:
cargo clean
# Install dev dependencies
setup:
cargo install cargo-nextest