Are there many architectures that NetBSD supports where GCC is not available?
The rustc_codegen_gcc project allows using the rustc compiler to target any architecture that GCC supports. I think it is pretty far along.
https://github.com/rust-lang/rustc_codegen_gcc
> getting a Rust compiler running in the first place is hard
> bootstrap relies on a binary package
> the compiler would also have to be part of the base system
The gccrs project aims to make Rust a fully supported language in GCC. It is fully self-hosting and can be built from source. Once accepted, it will be one of the languages you get when you build GCC.
https://github.com/Rust-GCC/gccrs
When gccrs is ready, it will address all the above objections.
Linux faces the same issues. Today, Rust is optional in Linux and can be skipped on any platform not supported in LLVM and rustc. For Rust to become mandatory in Linux, gccrs is going to be required (for some platforms).
> the release cycles of Rust are not compatible with the NetBSD ones
I do not fully grasp the objection here. Obviously NetBSD would not be forced to use any Rust features they cannot compile. And using gccrs for the NetBSD kernel would not prevent them from bundling LLVM and rustc as well if they want.
Anyway, I am not advocating the use of Rust in NetBSD. I am merely pointing out that solutions to the issues raised are being worked on.
This does not paint the full picture. Rust can be bootstrapped with mrustc, which is written in C++
https://github.com/thepowersgang/mrustc
Now, mrustc supports only Rust 1.74. To build Rust 1.92, you need almost 20 builds. But this can be done from source
Guix has written about bootstrapping Rust from source (they care a lot about this). Here is how it looked like in 2018
It has no formal spec, changes too fast, depends on third party libraries that change faster than I can breath, and is controlled by a foundation that is controlled by big tech corps.
What could go wrong?