Stream: general

Topic: Deterministic effect logging and late materialization


view this post on Zulip Bogdan (Feb 20 2026 at 12:44):

Hi everyone,
I'm experimenting with a Wasmtime embedding that virtualizes selected WASI Preview 2 interfaces (clocks, random, selected filesystem ops).

Runtime sequence in the prototype:

  1. Guest code runs and requests effectful WASI operations.
  2. The embedding intercepts those imports via shims (no ambient host access).
  3. Each shim appends a canonical effect-intent record.
  4. The call returns a resolved value from an injected provider (replay log / fixture / simulated world).
  5. After the run, a separate promotion step can materialize selected intents under policy, producing real host effects (e.g. FS writes/network) or skipping them.

So execution-time resolution and real-world materialization are intentionally split.
Replay mode resolves effects strictly from the recorded log.
This is an embedding strategy only; it does not propose changes to WASI or the Component Model.

I'm curious:
Is there existing ecosystem work overlapping with this log-and-defer approach?
Are there Wasmtime constraints (resource tables, async model, canonical ABI lowering/lifting) that make this problematic, especially for filesystem handles?
Would a minimal artifact (embedding + replay demo) be useful for discussion here or is there a better forum?

view this post on Zulip dman-os (Feb 22 2026 at 09:31):

i don't know about defer but this seems similar to durable computation systems where one records effects in a log tape to allow replay. Look at https://obeli.sk/ for an example and I'm currently using a rough port of restate.dev 's design in a project over wasm.

view this post on Zulip Bogdan (Feb 23 2026 at 09:05):

Thanks for the suggestions! I was familiar with Restate, not with obelisk. Although they're higher level/more domain oriented than what I have in mind, obelisk definitely helps me confirm my direction is at least sane. I'd be very interested in anything you've learned from the Restate port?

view this post on Zulip Bailey Hayes (Feb 23 2026 at 22:43):

If you aren't already aware, I think you'd be interested in how wasi-virt virtualizes wasi interfaces: http://github.com/bytecodealliance/wasi-virt

view this post on Zulip Bogdan (Mar 02 2026 at 22:29):

@Bailey Hayes Thanks for the suggestion! I looked at the repo and it's very relevant. After seeing it, I tried to seam carve replay on top of it. But targeting the WASI P2 seems a bit harder than expected, so I'm currently focusing an a more narrow path: a runtime mediation + deterministic replay engine over a custom ABI (clocks, stdio/input, fs, net, entropy). Moving from build time virt to runtime also allows for late-binding policy choices.

view this post on Zulip IFcoltransG (Apr 27 2026 at 22:44):

You might also interested in this component proxying tool that Yan demo'd at the Plumbers Summit, which allows logging all imported calls: https://github.com/chenyan2002/proxy-component

view this post on Zulip Bogdan (May 16 2026 at 14:44):

@IFcoltransG Thanks a lot! It seems a lot of projects point out in the same direction of "all effectful calls need to cross a mediation boundary". I've managed to put together a runtime for a deterministic replay system on top of Wasmtime using a custom ABI for effectful operations, and I'm very happy with it. It also permits me to swap real effectful environments with synthetic ones, so I can test code against a mock filesystem provider and analyse the ledger of effects before deploying on an S3-backed instance, for example.

If you're also exploring this direction, I also found this prototype useful. It may be merged into Wasmtime upstream and does something similar, but optimized just for record-replay: https://github.com/bytecodealliance/wasmtime-rr-prototyping


Last updated: Jun 01 2026 at 09:49 UTC