HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
rust-lang
rustc_codegen_gcc
Rust2021–2026
rust-lang / rustc_codegen_gcc

rustc_codegen_gcc

libgccjit AOT codegen for rustc

18Distinct people
22Mentions
0Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

libgccjit AOT codegen for rustc

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year22 dated mentions

Observed mentions: 2021-12-08 16:07:15 UTC to 2026-07-03 22:09:52 UTC.

02468102021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC303
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC909
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC514
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

What Hacker News says

22 sources
Gccrs is valuable for various reasons (bootstrapping, refining the spec, etc), but for the main purpose of "compiling to targets supported by gcc but not llvm", it's definitely not as promising as https://github.com/rust-lang/rustc_codegen_gcc. It's a rustc backend, at the same level as llvm or cranelift, it's much further along than gccrs (already available as a rustup component and can compile any rust code) and will not suffer from lagging behind rustc. But OP has wider ambitions: the real niche targets are supported by neither gcc nor llvm. A rust-to-c transpiler that can adapt to weird C compilers should have a very wide reach.
In crustc: entirety of `rustc`, translated to C
> There are many architectures that NetBSD supports where Rust is not available 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 op
Read the rest
tional 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.
In Rust in the NetBSD Kernel, and other odd decisions
Here’s the set of platforms Rust supports [1] and indeed it has broad support due to LLMV. It obviously still needs to port it’s platform-specific parts of the stdlib to the platforms that aren’t nostd. There’s also [2] which broadens to the set of platforms that GCC supports although I think it might be more bleeding edge than even tier 3 platforms at the moment. I think the only place C really beats Rust is in vendors with toolchains they’ve stopped investing in. More broadly there’s clearly pressure for the industry to abandon C/C++ in favor of Rust given the inability of the language to be modernized into a safe version. [1] https://doc.rust-lang.org/nightly/rustc/platform-support.htm... [2] https://github.com/rust-lang/rustc_codegen_gcc
In Zlib-Rs Is Not Only Safer but Now Outperforming Zlib C Implementations
>> Is it possible that rust also uses MLIR as backend and thus benefits from a modern backend? Compiler backends require corresponding compiler frontends to do lexical analysis and parsing of the programming language into the intermediate representation (IR) that the backend accepts. The Rust compiler frontend currently lexes and compiles Rust source code into LLVM IR. It is possible to create a Rust frontend that lexes and compiles into other intermediate representations and there are several related projects: 1) gccrs (https://github.com/Rust-GCC/gccrs) is creating a GCC frontend for Rust that can be used with the GCC backend. 2) Cranelift (https://cranelift.dev/) is creating an alternate LLVM IR-based backend for Rust written in Rust since the current LLVM backend is written in C++. 3) rustc_codegen_gcc (https://github.com/rust-lan
Read the rest
g/rustc_codegen_gcc) is creating a bridge between the Rust compiler LLVM IR frontend and the GCC backend. So, while it is possible to create a Rust frontend to lex and parse Rust source code into MLIR I am not aware that anyone is working on it.
In Ask HN: Why rust cannot use the same compiler back end as mojo?
> Has the Rust-portability situation been addressed? The rust portability story is in the process of being addressed, by two different projects: gcc-rs[0] adds a Rust frontend to GCC. rustc-codegen-gcc[1] adds a GCC backend to rustc. Both are progressing pretty well, but it will likely still take a while until they reach maturity. > Or will this change restrict the number of platforms the Linux kernel will be usable on? There won't be any Rust inside the Linux core, only for drivers. So no, the linux kernel will always be usable on all platforms. However, the drivers written in Rust won't be usable on platforms not supported by LLVM until a GCC alternative becomes mature. > what will the advantages be? There are multiple: Safety, improved stability, and developer productivity. Compile time will likely take a hit (Rust is famously slow t
Read the rest
o compile), but I don't expect a big shift in runtime performance (could be slightly better due to the extra opportunities the compiler has for optimization, but it's not super likely). As for having any effects on Rust: it already has! A lot of unstable features got prioritized due to being necessary for the kernel, such as fallible allocations. [0]: https://github.com/Rust-GCC/gccrs - monthly reports at https://thephilbert.io/category/gccrs-status-updates/ [1]: https://github.com/rust-lang/rustc_codegen_gcc - monthly reports at https://blog.antoyo.xyz/
In Next steps for Rust in the kernel

Showing the 15 most recent of 22 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.