Skip to content
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

Implement the Wasm custom-page-sizes proposal #1197

Open
Robbepop opened this issue Sep 25, 2024 · 4 comments
Open

Implement the Wasm custom-page-sizes proposal #1197

Robbepop opened this issue Sep 25, 2024 · 4 comments

Comments

@Robbepop
Copy link
Member

This is about adding support for the custom-page-sizes Wasm proposal.

The custom-page-sizes Wasm proposal has been recently moved to Phase 3 and is moving forward quickly thus stabilization can be expected to happen soon.

Having custom-page-sizes support in Wasmi will be an enabler (in parts) for using Wasmi in even more embedded environments where memory usage is particularly constrained. Not every embedded environment can afford 64kB worth of linear memory for a single Wasm page.

@Robbepop
Copy link
Member Author

Robbepop commented Oct 1, 2024

Wasmtime introduced the MemoryTypeBuilder in order to set the various properties of a Wasm memory defined on the host side. Since Wasmi tries to implement the Wasmtime API for its users we should introduce the same API even though Wasmi's memory type isn't as complicated, yet.

Link: https://docs.rs/wasmtime/25.0.1/wasmtime/struct.MemoryTypeBuilder.html

@danielstuart14
Copy link

I'm working on it, currently waiting for the change to upstream wasmparser.

@Robbepop
Copy link
Member Author

Robbepop commented Nov 1, 2024

@danielstuart14 cool! Looking forward to the PR once the #1141 is merged. Unfortunately there is no clear time span for when we can finally merge #1141 because it relies on performance fixes in some parts of wasmparser that are not trivial to understand and refactor. Help there is welcome, too!

@Robbepop
Copy link
Member Author

@danielstuart14 #1141 has just been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants