Skip to content

Add package_linux_mmtk image w/ Rust toolchain#288

Merged
topolarity merged 1 commit into
mainfrom
ct/add-rust
Jun 16, 2026
Merged

Add package_linux_mmtk image w/ Rust toolchain#288
topolarity merged 1 commit into
mainfrom
ct/add-rust

Conversation

@topolarity

Copy link
Copy Markdown
Contributor

Needed for JuliaLang/julia#62054.

The Rust version pinning is a bit strict. We may want to relax that in the binding or rely on rustup, etc. but for now this tries to bake a synchronized version of the toolchain into the image. I don't think we're trying to be on a particularly bleeding edge version of Rust, so the version should be fairly stable.

Created entirely by Claude Opus 4.8 noreply@anthropic.com (reviewed by me)

@DilumAluthge DilumAluthge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also seems to modify the regular package_linux. Is that just NFC refactoring (are you just moving the code out into gcc.jl), or are you making actual functional changes to package_linux?

Julia's MMTk garbage collector (WITH_THIRD_PARTY_GC=mmtk) builds a Rust
binding from source with `cargo` during the Julia build, and its build.rs
runs `bindgen` (which needs libclang) to generate the FFI bindings. None
of the existing rootfs images carry Rust or libclang.

Add a dedicated `package_linux_mmtk` image rather than extending the
shared `package_linux` (which every Linux build job downloads), since the
Rust std lib and clang add several hundred MB only the MMTk job needs. It
is `package_linux` plus `clang`/`libclang-dev` and a pinned Rust toolchain.

Rust is installed from the official standalone distribution (not rustup)
straight into /usr/local, so `cargo`/`rustc` land on the default PATH and
work in the non-login, non-interactive shells Buildkite uses, with no
RUSTUP_HOME/CARGO_HOME plumbing and no toolchain download at Julia build
time. The pinned version (1.92.0) must be kept in sync with the binding's
rust-toolchain file in JuliaLang/julia.

Factor the shared GCC 9 cross-toolchain install out of package_linux.jl
into install_gcc_toolchain so the two images stay in sync by construction,
mirroring the existing install_awscli helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@topolarity

Copy link
Copy Markdown
Contributor Author

Is that just NFC refactoring (are you just moving the code out into gcc.jl), or are you making actual functional changes to package_linux?

That's intended to be an NFC refactoring so that it can be used in package_linux_mmtk

arch = normalize_arch(arch) should be the only code difference in the body

@topolarity
topolarity merged commit 082021c into main Jun 16, 2026
44 checks passed
@topolarity
topolarity deleted the ct/add-rust branch June 16, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants