#rationale for packed structs and unions

1 messages · Page 1 of 1 (latest)

wide flower
#

Are these typically only used when a Zig program wants to share access to the data with C code?

little elm
#

packed structs and packed unions are more for bit interactions

#

bitfields? packed struct

#

THey are just int with extra steps 😄

#

For C interop is extern

silent zodiac
#

i’d think of extern structs that way. i like packed structs for situations where i’d otherwise be OR-ing together a buncha options