Skip to content

Commit 590c2ca

Browse files
anvansterclaude
andauthored
build: pin the Rust toolchain to 1.94.1 (#28)
* build: pin the Rust toolchain to 1.94.1 Release engines are built on four hosts plus a container that installs its own Rust. Unpinned, they ran three different rustc versions. A rust-toolchain.toml makes rustup on every host, and in the linux-arm64 container, use the same compiler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017rVbt7rENTwXkdHt3Bpgb5 * no-mistakes(review): Add darwin-x64 target to pin and drop stable bootstrap * no-mistakes(document): Point build-from-source docs at pinned Rust toolchain --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ae2bed1 commit 590c2ca

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ cd vscode && npm install && npm run esbuild # VS Code extension
475475
npx @vscode/vsce package # VSIX
476476
```
477477

478-
Requires Rust stable, Node.js 18+, VS Code 1.90+.
478+
Requires rustup (it installs the Rust version pinned in `rust-toolchain.toml`), Node.js 18+, VS Code 1.90+.
479479

480480
---
481481

‎rust-toolchain.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# One compiler for every release build. Each platform's engine is built on a
2+
# different host (and linux-arm64 in a container that installs Rust itself);
3+
# without a pin they drifted onto three different rustc versions, so one release
4+
# shipped binaries the same source compiled differently.
5+
[toolchain]
6+
channel = "1.94.1"
7+
components = ["rustfmt", "clippy"]
8+
profile = "minimal"
9+
# darwin-x64 is cross-built on the arm64 Mac.
10+
targets = ["x86_64-apple-darwin"]

‎scripts/build-linux-arm64.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ apt_install gcc-11 g++-11 clang libclang-dev cmake pkg-config libssl-dev make bi
139139
140140
if ! command -v cargo >/dev/null 2>&1; then
141141
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
142-
| sh -s -- -y --default-toolchain stable --profile minimal >/dev/null || exit 1
142+
| sh -s -- -y --default-toolchain none --profile minimal >/dev/null || exit 1
143143
fi
144144
. "$HOME/.cargo/env"
145145
@@ -162,6 +162,7 @@ restore_ownership() {
162162
trap restore_ownership EXIT
163163
164164
cd /src
165+
rustc --version || { echo "RUST TOOLCHAIN INSTALL FAILED"; exit 1; }
165166
export CARGO_TARGET_DIR=/target
166167
export CC=gcc-11 CXX=g++-11
167168
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=gcc-11

‎vscode/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ cd vscode && npm install && npm run esbuild # VS Code extension
145145
npx @vscode/vsce package # VSIX
146146
```
147147

148-
Requires Rust stable, Node.js 18+, VS Code 1.90+.
148+
Requires rustup (it installs the Rust version pinned in `rust-toolchain.toml`), Node.js 18+, VS Code 1.90+.
149149

150150
---
151151

0 commit comments

Comments
 (0)