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:
+3
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user