build: zig build-lib -target wasm32-freestanding -dynamic --export-table await.zig
run node await.js
output hello world!!!
(but slow like a typwritter effect)
generate async zig wasm. this requires grappling with several issues:
- wasm can only expose export/extern which cannot be async
- frames need to survive until callback happens
- frames must be passed as pointers
figure out the right approach to all of these at the same time, else cryptic errors.
I did not find any examples of this available, but now there is this one
This knowledge is quite beneficial. Right word hurdle when I needed it the most