Learning to build+preserve a x-compile toolchain
⚓ Rust 📅 2026-05-01 👤 surdeus 👁️ 3Hello! TL;DR I'm learning how to build+preserve the Rust toolchain supply-chain for 10+ years. I'm climbing the learning curve and could use a push in the right direction.
Here's the problem I need to solve: building+preserving the rust toolchain. I'd like to bring Rust into our product development portfolio (embedded Linux product line). We always in-house our software supply chain. We use offline build servers. We have a local mirror of Python, JS, etc, software repositories.
We need to be able to build the toolchain and preserve all the artifacts so we can build the toolchain again 10+ years from now. Silly example, if leftpad-rs has a CVE three years from now, we need to be able to integrate only that fix into our toolchain.
We use C/C++ compilers from our chipset vendors. Sometimes we build our own gcc from tarballs using crosstool (and then stash the tarballs and scripts into cold storage). So I need to use our x-compiler to build the Rust x-compiler.
I can't do something as simple as 'run rust-cross and tarball the binary blobs because we need to be able to selectively update the toolchain in the future.
The steps I've taken so far: I'm building rust from source using the instructions How to build and run the compiler - Rust Compiler Development Guide I'm reading Adding a new target - Rust Compiler Development Guide on adding a new target so we can use our chipset vendor C/C++ compiler to Build All the Things.
Am I on the right track with the Build A New Target docs? Or is this an already solved problem? I haven't been able to find much online about this sort of problem with Rust.
Many thanks!
2 posts - 2 participants
🏷️ Rust_feed