Article 7910G [$] Owning C types from Rust code

[$] Owning C types from Rust code

by
daroc
from LWN.net on (#7910G)

Rust's system of ownership and borrowed references is convenient when it cancorrectly model a program's needs. TheRust for Linux project has worked toprovide adapters between Rust's semantics and the existing C codein the kernel. At Kangrejos 2026, Andreas Hindborg spoke about apatchseries implementing the next such adaptor: an Ownable trait forrepresenting objects that are allocated in C code, but which Rust code is responsiblefor cleaning up (if not necessarily deallocating) when it is done with them.He hoped to finally reach a consensus on the patch series, after months ofdiscussion on the mailing list.

External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments