Skip to content

feat: save/restore full interpreter snapshots#32

Merged
dylan-sutton-chavez merged 4 commits into
mainfrom
snapshot/save-restore
Jul 23, 2026
Merged

feat: save/restore full interpreter snapshots#32
dylan-sutton-chavez merged 4 commits into
mainfrom
snapshot/save-restore

Conversation

@dylan-sutton-chavez

@dylan-sutton-chavez dylan-sutton-chavez commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Adds full interpreter snapshots: freeze a paused run (waiting on receive(), sleep(), frame(), or a host call) into a portable blob and resume it later, even on a fresh page load.

  • save_state / restore_state capture and revive the whole VM. Val bits and heap slots are kept verbatim, so references, cycles, and interning survive.
  • The blob embeds the source plus a bytecode fingerprint, so restore rejects a different program or compiler build.
  • state_globals / state_stack introspect a parked run without resuming it.
  • Pause and snapshot programs with no suspension point
  • Docs and tests.

Host-side resources (DOM handles, sockets, in-flight host calls) are not part of a snapshot.

issue: #28
cc: @vrthra

@dylan-sutton-chavez
dylan-sutton-chavez merged commit 3c6e762 into main Jul 23, 2026
3 checks passed
@dylan-sutton-chavez
dylan-sutton-chavez deleted the snapshot/save-restore branch July 23, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant