Re: C aggregate passing (Rust kernel policy)
From: Miguel Ojeda
Date: Wed Feb 26 2025 - 08:53:56 EST
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".
> Interestingly, some other features of Rust are defined through C++
> or implemented similar to C++.
Of course, Rust has inherited a lot of ideas from other languages.
It is also not uncommon for specifications to refer to others, e.g.
C++ refers to ~10 documents, including C; and C refers to some too.
> Exception/unwind safety may be another subject that increases
> the difficulty of writing unsafe Rust.
Note that Rust panics in the kernel do not unwind.
Cheers,
Miguel