Re: C aggregate passing (Rust kernel policy)

From: Ralf Jung
Date: Wed Feb 26 2025 - 09:08:04 EST


Hi all,

On 26.02.25 14:53, Miguel Ojeda wrote:
On Wed, Feb 26, 2025 at 2:03 PM Ventura Jack <venturajack85@xxxxxxxxx> wrote:

One worry I do have, is that the aliasing rules being officially
tied to LLVM instead of having its own separate specification,
may make it harder for other compilers like gccrs to implement
the same behavior for programs as rustc.

I don't think they are (or rather, will be) "officially tied to LLVM".

We do link to the LLVM aliasing rules from the reference, as VJ correctly pointed out. This is basically a placeholder: we absolutely do *not* want Rust to be tied to LLVM's aliasing rules, but we also are not yet ready to commit to our own rules. (The ongoing work on Stacked Borrows and Tree Borrows has been discussed elsewhere in this thread.)

Maybe we should remove that link from the reference. It just makes us look more tied to LLVM than we are.

Kind regards,
Ralf