-
Notifications
You must be signed in to change notification settings - Fork 93
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
Building for WebAssembly #24
Comments
Should be possible, at least with some hacks. Raylib currently uses emscripten for web apps iirc. I'll check on this when I get back from vacation later this week. |
I'd also like to know. I would like to try Zig in a gamejam but I think WASM is essential for that. Any news on this front? |
Currently not possible, since raylib's |
raylib now has support for building for emscripten since raysan5/raylib#2901 was merged, but Zig can't generate the required extra files that create the required JS functions (for OpenGL etc.) so at least the link step for the final "executable" has to be done with emscripten. On the Zig side ziglang/zig#10836 tracks this issue. |
I was able to get it to work: https://github.com/bluesillybeard/ZigAndRaylibSetup It's a hassle to set up and it's also pretty janky, but it does work. Edit: Forgot to mention, I didn't use this wrapper, but instead used Raylib by itself |
If you can neatly integrate it into the current build script, don't hesitate to open a PR |
Fixed in #52 |
As the title says, is there any possibility building a project using
raylib-zig
to wasm ? Any examples of how to accomplish this?The text was updated successfully, but these errors were encountered: