How does one compile a module with pooling allocation support enabled?
Trying to enable pooling allocation in Wasmtime:
Module was compiled without pooling allocation support but it is enabled for the host.
@Radu M that's done by tweaking settings on a Config
, where the precompiled module needs to have basically the same settings as the store you're deserializing the precompiled module from
Which Config
object exactly?
When instantiating modules using the Linker
, you can only tweak the store's config, if I'm not mistaken.
@Radu M there's only one Config
object in the API, and it's configured before you create an Engine
I believe it's this method
Yeah, that's what I'm using as well.
and the Config
is configured the same way for the serialized/precompiled module as well as the engine that's deserializing the module?
Ah, you're right. I was trying to use an AOT compiled module, my bad.
Yeah right now the wasmtime compile
command doesn't support use with the pooling allocator out of the box, but you can set up a pooling allocator Config
and call Engine::precompile_module
just as easily
Last updated: Nov 22 2024 at 16:03 UTC