|
|
Log in / Subscribe / Register

Rust for embedded Linux kernels

Rust for embedded Linux kernels

Posted Apr 25, 2024 13:38 UTC (Thu) by khim (subscriber, #9252)
In reply to: Rust for embedded Linux kernels by atnot
Parent article: Rust for embedded Linux kernels

> When bindgen runs on your struct, it will just faithfully map all of those C pointers into an equivalent Rust struct.

Sounds like a problem of tooling to me. Why couldn't bindgen notice that there are list_head structure inside, add PhantomPinned marker and make sure that C ABI uses Pin<Foo> everywhere and not straight Pin<Foo>?

Then addition of list_head would still be ABI breakage, but it would be a compile-time ABI breakage and these are relatively easy to handle.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds