Originally posted by Developer12
View Post
Announcement
Collapse
No announcement yet.
GCC Rust Compiler "gccrs" Sees ~900 New Patches Upstreamed For GCC 14
Collapse
X
-
Originally posted by ehansin View PostI get so confused about all of the various components here, but think I may have figured it all out. What I think is going on is...
* rustc: The official Rust compiler.
* rustc_codegen_gcc: Allows GCC to be used with rustc, and LLVM by extension (I think!) Not sure what direction things pass through, but sounds like ultimately you get the greater architectural coverage of GCC, generating bytecode (or something like that) than can then be consumed by rustc/LLVM. So you ultimate get to use the offical Rust compiler.
* gccrs: What this article is about. A Rust compiler implantation purely in/using GCC. This means of course you are no using the official Rust compiler, and any delta between the two needs to be accepted.
That is where I am at now. But at least I took a few minutes to sort it out for future mental reference. Happy for any input if there is any.
- Likes 1
Comment
-
Originally posted by darcagn View Post
You're close. Regarding rustc_codegen_gcc: GCC has a component called `libgccjit` which can be embedded into programs to generate machine code at runtime (like for an interpreter, for example). That's its main purpose, but it can also generate machine code ahead-of-time as well with the same API, which is where rustc_codegen_gcc comes in. It uses the rustc frontend that Rust programmers are all familiar with, but instead of generating LLVM intermediate representation code, it generates code for the libgccjit API. libgccjit will then generate machine code ahead-of-time for any of the targets GCC supports.
- Likes 1
Comment
-
-
Originally posted by AHSauge View PostThen why is there a separate implementation in GCC? Licensing aside, what's the argument here?
- Likes 3
Comment
-
-
Originally posted by oleid View Post
I don't see why one couldn't LTO C code complied with gcc and rust code complied with rustc+libgccjit. Could you elaborate? Can't libgccjit output gimpl?
Comment
-
Originally posted by anarki2 View PostI don't understand why I would ever use this instead of the official compiler. I really don't.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Likes 2
Comment
Comment