3 Commits

Author SHA1 Message Date
ddidderr 6e68129247 build: add justfile for common dev and build tasks
Introduce a justfile to standardize the project's everyday commands so
contributors no longer need to remember the exact cargo invocations and
flags. Until now these commands lived only in shell history and memory,
which made the non-obvious ones (the LTO profile, the native install
incantation) easy to get wrong.

Recipes provided:
- dev (default): cargo run with passthrough args
- fmt: nightly rustfmt + tombi for TOML + just --fmt, mirroring the
  formatting already applied in recent commits (e.g. fc851e8)
- clippy: lint the whole workspace, all targets
- build / build-release / build-production: the three build tiers, with
  build-production using the release-lto profile defined in Cargo.toml
- install: install targeting the native CPU and x86_64-unknown-linux-gnu
  via the release-lto profile, force-overwriting any existing binary
- clean: cargo clean

The fmt and install recipes depend on external tools (fd, tombi, nightly
toolchain); these are assumed present in the dev environment and are not
auto-installed here.

Test Plan:
- `just --list` lists all recipes without parse errors
- `just --unstable --fmt --check` reports the file is already formatted
- `just build` and `just clippy` succeed against the current tree
2026-05-31 12:17:17 +02:00
ddidderr 5d5e1b3df3 [release] linkspeed v0.1.4 2026-05-31 11:58:13 +02:00
ddidderr 37d6b04dba [deps] cargo update
Updating indenter  v0.3.3  -> v0.3.4
Updating once_cell v1.21.3 -> v1.21.4
2026-05-31 11:58:10 +02:00
3 changed files with 42 additions and 6 deletions
Generated
+5 -5
View File
@@ -14,19 +14,19 @@ dependencies = [
[[package]]
name = "indenter"
version = "0.3.3"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5"
[[package]]
name = "linkspeed"
version = "0.1.3"
version = "0.1.4"
dependencies = [
"eyre",
]
[[package]]
name = "once_cell"
version = "1.21.3"
version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "linkspeed"
version = "0.1.3"
version = "0.1.4"
edition = "2024"
[dependencies]
+36
View File
@@ -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