Hi, I'm currently working on a benchmarking project for which I would like to compare the runtimes between AOT, JIT, and interpreted, using wasmtime (as well as wamr). Unfortunately I was not able to find the documentation on how to run my benchmarks AOT/JIT/interpreted specifically.
How can I specify the code execution model?
For AOT compilation: https://docs.wasmtime.dev/cli-options.html#compile ; tl;dr: you'll do a wasmtime compile then use wasmtime run --allow-precompiled file.cwasm.
For interpreted mode (Pulley), wasmtime compile --target pulley64 (if you're on a 64-bit host) then run. You may need to build with an extra feature to include Pulley if you're on a platform that has a full compiler backend.
Note however that you aren't going to find much interesting comparing the default ("JIT") and AOT, because they run literally exactly the same compilation. "JIT" just compiles to an in-memory ELF image first. So you'll see startup time ~equal to the time that wasmtime compile takes, then runtime performance will be identical. We don't do e.g. per-function compilation, tiering, or JIT-based specialization at all.
Last updated: Feb 24 2026 at 04:36 UTC