Make Rust formatting guidance runnable from repo root

The Rust crate layout expects formatting to run from the rust directory, so add a root-level wrapper that preserves the working command while forwarding user flags like --check. Documentation now points contributors at the wrapper instead of the misleading virtual-workspace manifest invocation.

Constraint: Root-level cargo fmt --manifest-path rust/Cargo.toml is misleading for this virtual workspace
Rejected: Document cd rust && cargo fmt directly | a root wrapper gives one stable repo-root command
Confidence: high
Scope-risk: narrow
Tested: scripts/fmt.sh --check
Tested: git diff --check
This commit is contained in:
Yeachan-Heo
2026-04-28 09:38:08 +00:00
parent 74ea754d29
commit 07992b8a1b
2 changed files with 6 additions and 1 deletions

5
scripts/fmt.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/../rust"
exec cargo fmt "$@"