Re: C aggregate passing (Rust kernel policy)

Philip Herron
2025-02-24T16:42:49Z

On Mon, 24 Feb 2025 at 14:54, Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Mon, Feb 24, 2025 at 3:47 PM Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
> >
> > On Mon, Feb 24, 2025 at 1:58 PM Theodore Ts'o <tytso@mit.edu> wrote:
> > >
> > > Hmm, I wonder if this is the reason of the persistent hostility that I
> > > keep hearing about in the Rust community against alternate
> > > implementations of the Rust compiler, such as the one being developed
> > > using the GCC backend. *Since* the aliasing model hasn't been
> >
> > I guess you are referring to gccrs, i.e. the new GCC frontend
> > developed within GCC (the other one, which is a backend,
> > rustc_codegen_gcc, is part of the Rust project, so no hostility there
> > I assume).
> >
> > In any case, yes, there are some people out there that may not agree
> > with the benefits/costs of implementing a new frontend in, say, GCC.
> > But that does not imply everyone is hostile. In fact, as far as I
> > understand, both Rust and gccrs are working together, e.g. see this
> > recent blog post:
> >
> > https://blog.rust-lang.org/2024/11/07/gccrs-an-alternative-compiler-for-rust.html
>
> Cc'ing Antoni, Arthur and Philip, in case they want to add, clarify
> and/or correct me.
>
> Cheers,
> Miguel

Resending in plain text mode for the ML.

My 50 cents here is that gccrs is trying to follow rustc as a guide, and
there are a lot of assumptions in libcore about the compiler, such as lang
items, that we need to follow in order to compile Rust code. I don't have
objections to opt-out flags of some kind, so long as it's opt-out and people
know it will break things. But it's really not something I care about right
now. We wouldn't accept patches to do that at the moment because it would
just make it harder for us to get this right. It wouldn’t help us or Rust for
Linux—it would just add confusion.

As for hostility, yeah, it's been a pet peeve of mine because this is a
passion project for me. Ultimately, it doesn't matter—I want to get gccrs
out, and we are very lucky to be supported to work on this (Open Source
Security and Embecosm). Between code-gen-gcc, Rust for Linux, and gccrs, we
are all friends. We've all had a great time together—long may it continue!

Thanks

--Phil