5 ms·
I think the “but why?” comments are on point. The reason for standardization in C/C++ (proprietary compilers) does not exist for rust. If you’re worried about b
by adastra22 2y ago
I think the “but why?” comments are on point. The reason for standardization in C/C++ (proprietary compilers) does not exist for rust. If you’re worried about breakage across compiler releases, then peg the compiler version. Modern tooling doesn’t gets the problems C/C++ standards and multiple implementations solve.
I see not just zero but actual negative utility to a second rustic implementation.
- baq 2y agoIf the only win was being able to build a recent rustc on a new architecture without having to build 50 versions it’s still positive.
- adastra22 2y agoThis isn’t the best way towards doing that though. Either use a rust -> C transpiler, or a llvm -> C compiler. Both of those projects already exist btw.
- MBCook 2y agoMost kernels are compiled with GCC right? Being able to use LLVM is a recent in the grand scheme of things. I suspect being able to use GCC might help rust adoption in the kernel because it means people don’t have to use a second to compiler.
- adastra22 2y agoI would have no problem if it was a compiler for a kernel-specific variant or subset of the rust language, and only used for that project. That actually sounds like a good way of moving forward. But they’re talking about making a second implantation for the purpose of quirks documentation and standardization. Rust doesn’t need that.
- SkiFire13 2y agoThat doesn't require a whole new frontend, just a GCC backend will be enough. This is in fact already being worked on with rustc_codegen_gcc https://github.com/rust-lang/rustc_codegen_gcc https://github.com/rust-lang/rustc_codegen_gcc
- MBCook 2y agoBut that still requires the rust compiler doesn’t it? So that’s still two compilers.
- SkiFire13 2y agoThat works with rustc, so you only need one rust compiler frontend as opposed to two.
- MBCook 2y agoThere wouldn’t be two rust compilers. But you still need GCC + rustc to compile the full kernel. And that’s what was suggesting was an issue. I suspect people want to be able to use only GCC.
- SkiFire13 2y agoThe difference would be using GCC frontend + GCC backend vs rustc frontend + GCC backend. You don't really use "more" compilers with rustc_codegen_gcc, except in name only. However I do realize that people often care about these little details.
- sham1 2y agoIn my opinion at least, having a way to bootstrap rustc and the rust ecosystem is quite nice, as more and more projects start using the language. And having multiple bootstrapping methods just makes it nicer. Helps with efforts like those of GNU Guix and other similar projects[0] that want to be able to have proper provenance for packages. Could help mitigate certain classes of supply chain attacks. (Even if not eliminate them completely!) [0]: <https://bootstrappable.org/ https://bootstrappable.org/>