4 ms·
Luckily, the gccrs developemt work is now backed by a company who is paying the main developer: > https://rust-gcc.github.io/ https://rust-gcc.github.io/ Havi
by cbmuser 6y ago
Luckily, the gccrs developemt work is now backed by a company who is paying the main developer:
> https://rust-gcc.github.io/ https://rust-gcc.github.io/
Having Rust support directly built into GCC means Rust code in kernel will not limit portability and no additional toolchain will be needed.
- habitue 6y ago> The project is still in an early phase with the goal to compile the offical Rust test suite. There are no immediate plans for a borrow checker as this is not required to compile rust code and is the last pass in the RustC compiler. This is essentially a reimplementation of rustc. I'm not going to say "don't boil the ocean" but it will likely be a while before this is at feature parity with the main compiler. Even with a full-time developer. There is a project to use gcc as a backend for rustc, which might be a more tractable option to removing the llvm dependency in the short term: https://github.com/antoyo/rustc_codegen_gcc https://github.com/antoyo/rustc_codegen_gcc
- monoideism 6y agoAgreed. It would likely take a half-a-dozen full-time devs several years to fully re-implement Rust, if they're highly skilled. A gcc rustc backend is the way to go, clearly. That company would have been better off paying for that.
- xiphias2 6y agoThe goal for the dev is to be able to compile rust code in governmental code base. As all the static checking will still be done with rustc, it doesn't need to be a full compiler.
- monoideism 6y ago> As all the static checking will still be done with rustc, it doesn't need to be a full compiler. So then this is just a backend?
- Gaelan 6y agoIf you're talking about gccrs, no, it's a full reimplementation. I think your parent is saying developers can use rustc (including its borrow checker) while iterating, then produce the release builds using gccrs from code that is known to borrow check.
- deleted 6y ago[deleted]
- steveklabnik 6y ago> That company would have been better off paying for that. This is only the case if you assume their primary goal is to get a reimplementation as fast as possible. In my understanding that is not their primary goal. Their primary goal is to not require a Rust compiler in the build process. This means that the approach you suggest doesn't fit requirements.
- monoideism 6y ago"Their primary goal is to not require a Rust compiler in the build process" Do you mean their goal is not to require `rustc` in the build process? Because I'm not sure how they're going to compile rust code without a rust compiler.
- steveklabnik 6y agoThey wouldn’t need to compile Rust code, because said compiler would be implemented in C++. It would produce a Rust compiler, but would not require one to exist in order to do so.
- Tobu 6y agomrustc for bootstrapping, rust_codegen_gcc (which doesn't seem like it would make stage1 much harder to compile) once the rest of the compiler has been brought up, isn't that the more realistic plan?
- steveklabnik 6y agoThat's significantly more complex, and would still involve relying on a pre-built binary.
- rodgerd 6y ago> This is essentially a reimplementation of rustc. And a dishonest reimplementation at that. If you aren't enforcing the promises the language makes, you're delivering a lie.
- habitue 6y agoI think the page is just saying they are so far from being at the borrow checker stage they aren't going to worry about it initially. But it sounds like eventually they'd implement it.