Skip to content

Persist snapshot to disk#1373

Open
ludfjig wants to merge 3 commits intohyperlight-dev:mainfrom
ludfjig:disk_snapshot
Open

Persist snapshot to disk#1373
ludfjig wants to merge 3 commits intohyperlight-dev:mainfrom
ludfjig:disk_snapshot

Conversation

@ludfjig
Copy link
Copy Markdown
Contributor

@ludfjig ludfjig commented Apr 13, 2026

Save snapshots to disk via Snapshot::to_file(), load them via Snapshot::from_file(). Create sandboxes directly from loaded snapshots via MultiUseSandbox::from_snapshot(), bypassing ELF parsing and guest init. No memcpy needed!

With this PR I'm hoping to gather feedback on design, and also start a discussion about what features is necessary before we can release this. For example currently it's impossible to register any host functions on sandboxes created directly from snapshots, and probably a builder pattern could fix this (something like .with_host_func(hostfunc))

ludfjig added 2 commits April 7, 2026 12:13
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig ludfjig added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Apr 13, 2026
@ludfjig ludfjig force-pushed the disk_snapshot branch 3 times, most recently from 84873d3 to 7f499c8 Compare April 13, 2026 19:14
Save snapshots to disk via Snapshot::to_file(), load them back via
Snapshot::from_file(). Create sandboxes directly from loaded snapshots via
MultiUseSandbox::from_snapshot(), bypassing ELF parsing and guest init.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig ludfjig marked this pull request as ready for review April 13, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant