Files
bun-src/rust-toolchain.toml
2026-08-27 21:09:14 +00:00

38 lines
1.8 KiB
TOML

[toolchain]
channel = "nightly-2026-07-20"
# rust-src is needed for -Zbuild-std (Tier 3 targets like
# aarch64-unknown-freebsd have no prebuilt std). miri is for
# `bun run rust:miri`. targets ensures the
# Tier 2 cross-targets' prebuilt std is installed for THIS toolchain
# (bootstrap.sh / Dockerfile install only for the *default* toolchain at
# image-build time, so a `channel` bump here would otherwise leave the
# pinned nightly without them). Note: rustup ignores this whole file when
# RUSTUP_TOOLCHAIN is set in the env (which CI does to pin across worktree
# symlinks) — the ninja `rust_build_cross` rule's `rustup target add`
# self-heals that path. Keep this list as a fallback for direct
# `cargo build`/`cargo check`/rust-analyzer use.
# Mirrors `allRustTargets` in scripts/build/rust.ts minus aarch64-unknown-freebsd
# (Tier 3 — no prebuilt rust-std, cargo `-Zbuild-std` builds it from rust-src).
# darwin/windows triples build natively on their own agents, so the host std
# comes with the toolchain install regardless; they're listed here so a dev
# running `bun run rust:check-all` or `cargo check --target` from any host
# still gets prebuilt std for every Tier 1/2 triple.
# llvm-tools provides llvm-link/opt for the ELF cross-language LTO
# regular-LTO-summary fix-up (scripts/build/rust-lto-fix-cli.ts). CI agents
# that pin via RUSTUP_TOOLCHAIN bypass this list; that script self-heals by
# running `rustup component add llvm-tools` when the tools are missing.
components = ["rust-src", "rustfmt", "clippy", "miri", "llvm-tools"]
targets = [
"aarch64-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-unknown-linux-musl",
"aarch64-linux-android",
"x86_64-linux-android",
"x86_64-unknown-freebsd",
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-pc-windows-msvc",
"x86_64-pc-windows-msvc",
]