5 ms·
If we get the Rust backend for gcc finalized and merged first, it would be much easier to get Rust code into the kernel: > https://github.com/philberty/gccrs/
by cbmuser 6y ago
If we get the Rust backend for gcc finalized and merged first, it would be much easier to get Rust code into the kernel:
> https://github.com/philberty/gccrs/ https://github.com/philberty/gccrs/
- gok 6y agoThat's a front end?
- Spivak 6y agoCompile C to Rust! Easiest language migration ever.
- fanf2 6y agohttps://c2rust.com/ https://c2rust.com/
- zelly 6y agoIt shares the code generator with gcc. It doesn't transpile C to Rust or vice versa. The goal is to produce machine code directly.
- fractalb 6y agoThat would eliminate the need for Rust. Just imagine, if your C code can be converted into Rust, would there ever be a case to start a fresh project in Rust? It will permanently become an Intermediate language.
- cbmuser 6y agoYou’re right, sorry. I’ve been dealing too much with backends that my brain mixed up the words.
- snuxoll 6y agoHow would that make things any easier? The kernel supports being built with clang now, and there’s no issue linking an object built with another compiler into a module either.
- quietbritishjim 6y agoEven if it is possible to build the kernel with clang, presumably that doesn't mean it is acceptable to suddenly require the kernel to be built with clang?