-
Notifications
You must be signed in to change notification settings - Fork 177
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
the allowed set of wasm features is not clear #754
Comments
related: #679 |
My proposal is to support the WASM 1.0 specification with bulk-memory extensions. Passive data segments (part of the bulk-memory spec) are especially useful for WASM-4 when having data that is only loaded sometimes, for example game levels or soundtracks. This avoids it taking up precious working-memory when the data isn't needed. I've personally had to work around this using a preprocessor to generate literals in code that initialize memory sections on demand, but this is very space-inefficient for the same purpose. The problem with defining the bulk-memory spec as supported is that wasm3 doesn't support all bulk-memory features yet, and the ability to load passive memory is one still missing last I checked. The wasm3 development has mostly stagnated due to the still ongoing war, and I feel like we can't completely standardize the WASM-4 supported feature-set before there's a strategy for both the web and native runtimes to support it. Some ideas:
Regardless of what we go with, it would be nice to tie it into #491 to make sure all published games actually follow it. There could of course be exceptions (for things like WasmGC), but that those games are then marked as outside of WASM-4 specification. |
i was thinking about something similar for my carts. but i quickly gave up because it seemed difficult/impossible with wasm-ld. maybe viable for some other languages though.
the latest llvm has something called bulk-memory-opt.
wasm4 ci builds libretro artifacts with toywasm as well. anyway, as toywasm is generally slower than wasm3, i suspect it isn't a great replacement for the purpose of wasm4.
i agree. |
when working on #749, i wondered what wasm features are allowed to be used by carts.
however, i couldn't find documentation stating it.
for example, bulk-memory instructions are used by some of carts out there.
otoh, C Makefile provided by w4 doesn't enable it.
i guess it's "whatever wasm3 support"?
The text was updated successfully, but these errors were encountered: