Restore Rust core at repository root

Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-08-20 03:40:59 +00:00
co-authored by heaust
parent f12c7c9603
commit d095ee7849
15 changed files with 697 additions and 103 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
command -v npm >/dev/null
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
for command in npm cargo wasm-pack; do command -v "$command" >/dev/null; done
amp orb services ensure
+10
View File
@@ -1,4 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
if ! command -v rustup >/dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
fi
toolchain="$(sed -n 's/^channel = "\([^"]*\)"/\1/p' rust-toolchain.toml)"
rustup toolchain install "$toolchain" --profile minimal --component rust-src,rustfmt --target wasm32-unknown-unknown
if ! command -v wasm-pack >/dev/null; then
cargo install wasm-pack --version 0.15.0 --locked
fi
npm ci
amp orb services ensure