Stream: wasmtime

Topic: Questions about the Wasmtime cache


view this post on Zulip Katie And (Jan 14 2024 at 18:45):

Hey! I'm using a rust crate that uses Wasmtime to handle a plugin system (Extism, you all have probably heard of it).

My program usually has a very short runtime, but compiling WASM into something that can be executed adds a lot of wait time the first time the program is run after a while. There's only very specific conditions under which the plugins should really be recompiled from the Wasm, and I think I'm capable of handling these myself. Extism doesn't expose anything like this - but is it possible at all with Wasmtime?

I suppose this is equivalent to giving my project a permanent cache? Except, of course, I would like to delete the cached stuff on those occasions where recompiling is a thing I want

view this post on Zulip nagisa (Jan 14 2024 at 21:04):

See https://docs.rs/wasmtime/latest/wasmtime/struct.Engine.html#method.precompile_module and https://docs.rs/wasmtime/latest/wasmtime/struct.Module.html#method.deserialize


Last updated: Oct 23 2024 at 20:03 UTC