-
Notifications
You must be signed in to change notification settings - Fork 173
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
update zig template #671
Comments
hmm, poking the repository, I see the master branch already changed the template to use executable (and with a better way to do it!), it is just not on the release version yet |
@Ruulul No need for an entrypoint: wasm4/cli/assets/templates/zig/build.zig Line 14 in 091b829
addExecutable )
As a small sidenote, I have two command line tools that I use to start projects for TIC-80 and Sokol Zig: Maybe I should also create something like that for WASM-4 :) Note I have used the new I guess we could have a |
in the process of poking your links and the build documentation, I learned so much more about the capacities of the zig build system I replaced the gonna soon publish this small simulator to wasm4, just need to adjust some things first |
I just published my zig-wasm4-starter-kit which might interest you. |
And I have a little tool myself over at https://github.com/peterhellberg/w4-init which I've so far used in a few small experiments ✨ |
Using master build 0.12.0-dev.1625+6fd1c64f2.
Currently, when you try to build with the template, it has issues, related to open issues with compiling as lib on wasm.
Current workaround: add a dummy
export fn _start() void {}
and compile as executable.Ergonomics suggestion: it is possible to make zig itself call the
w4
, requiring a relatively small addition to the build and a new file:Opening as an issue first to know if I should just directly make a PR to the templates?
It bothers me that one has to create the _start function, but I couldnt find a better workaround
The text was updated successfully, but these errors were encountered: