From a9fd6e7316594a53127936fcff7629a467eeb37d Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 11 Jun 2026 08:47:10 -0400 Subject: [PATCH] Bootstrap Rust in Unix installer --- install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e96642e..ff1f1c1 100755 --- a/install.sh +++ b/install.sh @@ -92,7 +92,18 @@ need() { fi } -need cargo +ensure_cargo() { + if command -v cargo >/dev/null 2>&1; then + return + fi + need curl + echo "cargo not found; installing Rust toolchain with rustup" >&2 + curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y + # shellcheck disable=SC1091 + . "$HOME/.cargo/env" +} + +ensure_cargo cleanup() { if [ -n "${tmpdir:-}" ]; then