Zig Master: Extern Struct

Zig Master: Extern Struct

Dude the Builder

4 месяца назад

586 Просмотров

Help me create more content like this!
https://www.paypal.com/donate/?hosted_button_id=Y6DEFHEEWVBXJ

If you need your structs to interoperate with C code, the extern struct in Zig is your friend. Although it is restricted to adhere to the target C ABI, it will allow you to use all the power of structs in Zig while being able to use those same structs on the C side.

The code: https://codeberg.org/dude_the_builder/zig_master

Relevant Links:
https://ziglang.org/documentation/master/#struct

Thumbnail artwork courtesy of: https://www.deviantart.com/krit26/gallery
Ссылки и html тэги не поддерживаются


Комментарии: