Files
faunosteo/scripts/rust-env.sh
T
bchanot f2cf93668e chore(workspace): native Rust toolchain as the primary path, builder image as the reproducible alternative
scripts/rust-check.sh and scripts/wasm-build.sh (moved from docker/) run
natively on the user-level rustup toolchain pinned by rust-toolchain.toml;
scripts/rust-env.sh puts ~/.cargo/bin on PATH for non-interactive shells.
Root scripts: rust:check and wasm:build native, rust:check:docker and
wasm:build:docker through docker/rust-run.sh, check:all = scripts/check-all.sh,
the whole pre-merge gate in one command (rust check, types drift, wasm build,
pnpm check, application image, worker:test, worker:image started read-only).
The native check now runs the worker's unit tests (cargo test --workspace);
the sandbox tests stay feature-gated and Docker-only.
2026-10-13 01:19:13 +02:00

11 lines
513 B
Bash

# Sourced by the Rust scripts (never executed): puts the user-level rustup toolchain on
# PATH when the calling shell did not. Non-interactive shells skip ~/.bashrc, so editor
# tasks, git hooks and agent shells start without ~/.cargo/bin. rustup then selects the
# channel pinned by rust-toolchain.toml. Nothing here installs anything.
cargo_bin="${CARGO_HOME:-$HOME/.cargo}/bin"
if ! command -v cargo >/dev/null 2>&1 && [ -x "$cargo_bin/cargo" ]; then
PATH="$cargo_bin:$PATH"
export PATH
fi
unset cargo_bin