Peter Zijlstra
2025-Nov-24 14:55 UTC
linux-next: build failure after merge of the tip tree
On Mon, Nov 24, 2025 at 03:51:46PM +0100, Miguel Ojeda wrote:> On Mon, Nov 24, 2025 at 3:47?PM Peter Zijlstra <peterz at infradead.org> wrote:> By the way, I have had this patch around for RANDSTRUCT a long time: > > https://lore.kernel.org/rust-for-linux/20241119185747.862544-1-ojeda at kernel.org/ > > More than glad if someone confirms it works for them.../me mumbles something about using clang to inject C IR into the Rust thing and kicking bindgen to the curb :-)
Peter Zijlstra
2025-Nov-24 16:33 UTC
linux-next: build failure after merge of the tip tree
On Mon, Nov 24, 2025 at 03:55:44PM +0100, Peter Zijlstra wrote:> On Mon, Nov 24, 2025 at 03:51:46PM +0100, Miguel Ojeda wrote: > > On Mon, Nov 24, 2025 at 3:47?PM Peter Zijlstra <peterz at infradead.org> wrote: > > > By the way, I have had this patch around for RANDSTRUCT a long time: > > > > https://lore.kernel.org/rust-for-linux/20241119185747.862544-1-ojeda at kernel.org/ > > > > More than glad if someone confirms it works for them... > > /me mumbles something about using clang to inject C IR into the Rust > thing and kicking bindgen to the curb :-)FWIW it might be relatively simple to abuse precompiled headers for this. Generate the pch files using clang and the normal linux build flags, then let rust do something like: unsafe extern "C" include "header.h.pch" or whatever fits the syntax best -- some day I'll get around to learning this thing. That way you can fairly trivially inject AST/IR from another language -- including all the inline functions and inline asm bits.