-
Notifications
You must be signed in to change notification settings - Fork 143
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
Example of Zig+WebAssembly beyond hello world #239
Comments
For allocation, you're not supposed to call const allocator = std.heap.WasmAllocator.allocator();
allocator.create(...); https://zig.guide/standard-library/allocators ziglearn doesn't have a page on wasm specifically, but the GeneralPurposeAllocator does support wasm. This github probably isn't the right place to ask zig questions. I'm not sure why the libera chat web interface is broken. The first discord mentioned here is pretty active: https://github.com/ziglang/zig/wiki/Community, and StackOverflow has people answering questions tagged zig too. Documentation for the language is in the zig source code at https://github.com/ziglang/zig/blob/master/doc/langref.html.in |
I've built an example of Zig+WebAssembly that goes beyond the 2+2 "hello world" in the docs, and shows how to manage memory: https://github.com/jameshfisher/zig-wasm-beyond-hello-world
But I have a few questions.
std.heap.WasmAllocator
look reasonable? I couldn't find any examples anywhere.ctx
in that API? It seems to be ignored.Note: I tried to ask the above in the recommended chat. But it just kept giving me this error "Cannot send to nick/channel":
The text was updated successfully, but these errors were encountered: