wasmi icon indicating copy to clipboard operation
wasmi copied to clipboard

Implement the Wasm `custom-page-sizes` proposal

Open Robbepop opened this issue 1 year ago • 1 comments

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 avatar Sep 25 '24 16:09 Robbepop

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

Robbepop avatar Oct 01 '24 14:10 Robbepop

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

danielstuart14 avatar Nov 01 '24 20:11 danielstuart14

@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 avatar Nov 01 '24 21:11 Robbepop

@danielstuart14 #1141 has just been merged.

Robbepop avatar Nov 27 '24 18:11 Robbepop