-
Notifications
You must be signed in to change notification settings - Fork 68
Description
The custom-page-sizes proposal allows users to crates Wasm Modules that use memory in increment of less than 64KiB (the default page size). This is especially useful for use in highly constrained devices where 64KiB might be too much to ask for.
Reading and instantiating components using this proposal is possible, it is however not possible to "componentize" using cargo component will also benefiting from this proposal. The reason is twofold:
1. Generating any wasm modules from rust using this proposal is a chore.
2. Such a module cannot be turned into a component because wasmparser reject such files by default.
1 will solve itself in the coming months when rustc 1.91 lands. This version is the first to use LLVM 21.1.0 + which introduced support for this proposal in lld. Current nightly users can already generated such wasm modules with commands such as cargo +nightly rustc --target wasm32-unknown-unknown -- -Clink-arg=--page-size=1
2 Is what I would like to get changed. My reasoning for raising the issue in this repo and not the one containing wasmparser is that it makes more sense to follow what is done in wasmtime and make this opt-in. My dream solution would be to be able to run cargo component --enable-custom-page-sizes
I looked a bit at cargo component's code base and I didn't a place where argument could be passed to wasmparser so I'm unsure as to how to fix this issue.