Skip to main content

Module rr

Module rr 

Source
Available on crate features rr and runtime only.
Expand description

Core WebAssembly record/replay for a whole store.

Recording begins with an empty store, created by Store::new_recording. Objects receive numeric identities automatically; all construction is part of the trace. Traces identify core modules only by the checksums of their bytecode, so that they stay small.

Core function boundaries support numbers, vectors, and abstract function references. Modules that use GC or exceptions are unsupported. Shared memory, host table/global mutation, call hooks, custom signal handlers, Wasm stack switching, epoch deadline callbacks, and guest debugging are unsupported. Fuel and epoch interruption may yield to the async executor, which the guest cannot observe, but a recording in which they stop the guest (by trapping, or by the call being cancelled while it yields) cannot be replayed. Host writes through the memory APIs, including slices from Memory::data_mut, are recorded; writes through raw pointers such as Memory::data_ptr are not.

Traces describe execution at the level of WebAssembly semantics, and their format is versioned independently of Wasmtime, so that a trace does not have to be replayed by the version of Wasmtime that recorded it. They contain host-supplied data and can be large; applications should impose their own storage limits.

Structs§

Trace
A complete execution trace, including object construction and startup.

Functions§

checksum_hex
Formats a checksum as hexadecimal, as in file names and messages.
core_modules
Returns the core modules that engine compiles from wasm, with their checksums. wasm is a core module, in the binary or (with the wat feature) text format, which is returned as is.

Type Aliases§

Checksum
The SHA-256 checksum of a core module’s bytecode, by which traces identify the modules they instantiate.