Skip to content

Save/load snapshot from disk (oci format)#1465

Draft
ludfjig wants to merge 7 commits into
hyperlight-dev:mainfrom
ludfjig:disk_snapshot_oci
Draft

Save/load snapshot from disk (oci format)#1465
ludfjig wants to merge 7 commits into
hyperlight-dev:mainfrom
ludfjig:disk_snapshot_oci

Conversation

@ludfjig
Copy link
Copy Markdown
Contributor

@ludfjig ludfjig commented May 20, 2026

Needs #1459

@ludfjig ludfjig force-pushed the disk_snapshot_oci branch 5 times, most recently from 4fccc53 to 9a884b9 Compare May 29, 2026 22:15
ludfjig added 7 commits May 29, 2026 16:31
Wrap host-mapping lifetime management in dedicated RAII guards. On Linux `Mmap` owns the `mmap` reservation and calls `munmap` on drop. On Windows `MappedView` owns the mapped view and calls `UnmapViewOfFile`, and `FileMapping` owns the file-mapping HANDLE and calls `CloseHandle`.

`HostMapping` becomes a thin aggregate of these guards instead of carrying raw `(ptr, size, handle)` fields with a manual `Drop` impl, and exposes `ptr()`, `size()`, and `file_mapping_handle()` accessors that the `SharedMemory` trait defaults use.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
The blake3 `hash` field and helper provided a deterministic identity for in-memory and persisted Snapshots. The forthcoming OCI snapshot format relies on OCI image digests for content addressability and integrity, so the manual hash is redundant. Drop the field and its computation.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig ludfjig force-pushed the disk_snapshot_oci branch from 9a884b9 to 617bb52 Compare May 29, 2026 23:47
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