bytecodealliance / componentize-py

Apache License 2.0
128 stars 13 forks source link

Http example doesn't work with Wasmtime 21.0.1 #94

Open mikkelhegn opened 2 weeks ago

mikkelhegn commented 2 weeks ago

Trying to run the http example using wasmtime 21.0.1, I get the following error:

Error: memory index 0 has a minimum page size of 223 which exceeds the limit of 160

On my setup, using wasmtime-cli 18.0.0 it works as documented.

dicej commented 2 weeks ago

Does wasmtime serve -O pooling-allocator=n -S cli <component-filename> work? As of recent versions of Wasmtime, the pooling allocator is used by default, and it has a memory limit of 10MB, which is too small for even minimal Python (or .NET) apps. The memory limit can't be overridden from the CLI, unfortunately, so the only way to avoid it is to disable the pooling allocator entirely.

I think the solution would be to open a PR on Wasmtime that:

mikkelhegn commented 2 weeks ago

I can confirm that works.

dicej commented 2 weeks ago

https://github.com/bytecodealliance/wasmtime/pull/8849 should address this, although we'll probably need to wait until Wasmtime 23 for it to land in a release.