[Pre-RFC] BTF relocations
Rust Internals [Unofficial]
April 30, 2026
Does it have to be a feature of structs and arrays?
Could it instead be expressed as a macro or intrinsic function that gives an offset to use with ptr::read? (which could be sufficient to make getters and setters for something struct-like that isn't an actual struct)
Or maybe it could be implemented as getters and setters on extern opaque types?
It wouldn't be as neat as 1st class structs that work with literals and pattern matching, but might be sufficient to interact with kernel structs treating them as an API.
Discussion in the ATmosphere