- pin Rust 2021 / MSRV 1.89 and exact dependency versions - add typed model vocabulary (UTF-8 spans, canonical JSON-array node keys, node/edge/state enums, digest helpers) with unit tests - add deterministic diagnostics and unified error/exit semantics (0/1/2) - add the three-command clap surface with strict argument validation - record the single-derived-artifact decision, architecture overview and current public contract; STATUS lists real evidence only
32 lines
901 B
Bash
Executable File
32 lines
901 B
Bash
Executable File
#!/bin/sh
|
|
# Development helper: run cargo with the repository-local dependency cache.
|
|
#
|
|
# The cache directory `.cargo-home/` is ignored by git and is not required for a
|
|
# clean environment that can reach crates.io. It only makes repeated builds in
|
|
# an offline sandbox reproducible.
|
|
set -eu
|
|
|
|
ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
|
|
|
if ! command -v cargo >/dev/null 2>&1; then
|
|
for candidate in "$HOME/.cargo/bin" "$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin"; do
|
|
if [ -x "$candidate/cargo" ]; then
|
|
PATH="$candidate:$PATH"
|
|
export PATH
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
|
|
if ! command -v cargo >/dev/null 2>&1; then
|
|
echo "scripts/cargo.sh: cargo not found; install a Rust toolchain (MSRV 1.89)" >&2
|
|
exit 2
|
|
fi
|
|
|
|
if [ -d "$ROOT/.cargo-home" ]; then
|
|
CARGO_HOME="$ROOT/.cargo-home"
|
|
export CARGO_HOME
|
|
fi
|
|
|
|
exec cargo "$@"
|