4 ms·
Yeah, not sure what they're saying... I use bitfields in multiple of my rust projects using those macros.
by ZeWaka 10mo ago
Yeah, not sure what they're saying... I use bitfields in multiple of my rust projects using those macros.
- maweki 10mo agoI'm not a rust or systems programmer but I think it meant that as an ABI or foreign function interface bitfields are not stable or not intuitive to use, as they can't be declared granularily enough.
- SAI_Peregrinus 10mo agoC's bit-fields ABI isn't great either. In particular, the order of allocation of bit-fields within a unit and alignment of non-bit-field structure members are implementation defined (6.7.2.1). And bit-fields of types other than `_Bool`, `signed int` and `unsigned int` are extensions to the standard, so that somewhat limits what types can have bitfields.
- pjmlp 10mo agoAcross binary libraries ABI, regardless of static or dynamically linked?
- bigstrat2003 10mo agoDynamic linking is not something you do in general in Rust. It's possible, but the compiler currently does not guarantee a stable ABI so it's not something one generally does.