-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exportFn fails during semantic analysis #7
Comments
Hi! Thanks for reporting. I'll look into this later today. I haven't tested |
I looked into this a bit more. This is indeed an issue with Zig. I might try fixing this in Zig (sounds like a small but fun challenge!) Until then, your solution is the best way. I'll be sure to document this better. Also, because this is Zig and we can know the size of arrays passed into functions, no need to end the |
Thanks for having a closer look and also for the tip with the array :) |
There is now a work-in-progress PR that should address this: ziglang/zig#14796 |
The Zig MR is now merged, so I'll look into this in the next couple days |
It looks like the PR only partially fixed this. There is no longer a semantic analysis error, and the code compiles. But the symbol is not found in the output object. I'll look again at this later |
I found another Zig / Lua bindings project that seems to have solved this. Linking here to check on it later: https://github.com/truemedian/lunaro |
I've tried to build a simple shared module using the
exportFn
in acomptime
block. Using zig versionv0.11.0-dev.1638+7199d7c77
it fails with the following error:Since there is a TODO, I'm assuming this will be fixed at some point. But
git blame
tells me this TODO has been there for over 2 years, so who knows when that will happen.build.zig:
main.zig:
My current fix is to do the exporting and wrapping by hand, but maybe I'm missing something:
The text was updated successfully, but these errors were encountered: