Hi, guys! I'm new to all this WASM stuff and looking for deterministic WASM runtime (for some POC). Please advise whether Wasmtime is handling non-determinism issues and if yes, how (would be nice to point to some article/code)?
Hi @Olexiy Kulchitskiy -- the execution of Wasm in Wasmtime should be completely deterministic with a few exceptions:
Ah, stack depth as well; the point at which one gets a stack-overflow trap is implementation-defined (but that should not be observable in any normally-returning Wasm call, as the trap terminates the instance)
And the memory allocation limit.
You may also want to use the static_memory_forced
API, to prevent memory.grow
allocation from failing nondeterministically.
got it. Thank you
Relaxed SIMD will be deterministic per-platform but will appear nondeterministic across platforms - basically the same problem as for NaNs, but will require a different solution.
Last updated: Dec 23 2024 at 13:07 UTC