Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
brabel
on Aug 2, 2022
|
parent
|
context
|
favorite
| on:
Capy – Cross-platform library for making native GU...
You can, but you must explicitly declare your function wants to use C calling convention. See
https://ziglang.org/documentation/master/#toc-export
for an example, looks like this:
fn internalName() callconv(.C) void {}
It will not compile if you use types that the C-calling convention does not allow. Without this, no, you can't call Zig from C.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: