diff --git a/README.md b/README.md index a402813..4150b3e 100644 --- a/README.md +++ b/README.md @@ -475,7 +475,7 @@ cd vscode && npm install && npm run esbuild # VS Code extension npx @vscode/vsce package # VSIX ``` -Requires Rust stable, Node.js 18+, VS Code 1.90+. +Requires rustup (it installs the Rust version pinned in `rust-toolchain.toml`), Node.js 18+, VS Code 1.90+. --- diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..7eaaa41 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,10 @@ +# One compiler for every release build. Each platform's engine is built on a +# different host (and linux-arm64 in a container that installs Rust itself); +# without a pin they drifted onto three different rustc versions, so one release +# shipped binaries the same source compiled differently. +[toolchain] +channel = "1.94.1" +components = ["rustfmt", "clippy"] +profile = "minimal" +# darwin-x64 is cross-built on the arm64 Mac. +targets = ["x86_64-apple-darwin"] diff --git a/scripts/build-linux-arm64.sh b/scripts/build-linux-arm64.sh index a66e395..6b85005 100755 --- a/scripts/build-linux-arm64.sh +++ b/scripts/build-linux-arm64.sh @@ -139,7 +139,7 @@ apt_install gcc-11 g++-11 clang libclang-dev cmake pkg-config libssl-dev make bi if ! command -v cargo >/dev/null 2>&1; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ - | sh -s -- -y --default-toolchain stable --profile minimal >/dev/null || exit 1 + | sh -s -- -y --default-toolchain none --profile minimal >/dev/null || exit 1 fi . "$HOME/.cargo/env" @@ -162,6 +162,7 @@ restore_ownership() { trap restore_ownership EXIT cd /src +rustc --version || { echo "RUST TOOLCHAIN INSTALL FAILED"; exit 1; } export CARGO_TARGET_DIR=/target export CC=gcc-11 CXX=g++-11 export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=gcc-11 diff --git a/vscode/README.md b/vscode/README.md index c88bb82..a960c3a 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -145,7 +145,7 @@ cd vscode && npm install && npm run esbuild # VS Code extension npx @vscode/vsce package # VSIX ``` -Requires Rust stable, Node.js 18+, VS Code 1.90+. +Requires rustup (it installs the Rust version pinned in `rust-toolchain.toml`), Node.js 18+, VS Code 1.90+. ---