Problem
Hyperlight snapshots persist the host-function names and type signatures needed
to restore guest state, and SandboxBuilder::from_snapshot().build() validates
the restoring registry against them.
The persisted requirements are not exposed through the public Snapshot API.
Consumers therefore cannot inspect a loaded snapshot before building a sandbox
to discover requirements such as ResolveModule and LoadModule. They must
already know the contract or attempt restoration and parse the resulting
mismatch error.
Wrapper runtimes also cannot present a complete requirements API because the
underlying Hyperlight requirements are private.
Proposed change
Expose an immutable view of the host-function requirements recorded by a
Snapshot, including each function name and exact parameter and return types.
Problem
Hyperlight snapshots persist the host-function names and type signatures needed
to restore guest state, and
SandboxBuilder::from_snapshot().build()validatesthe restoring registry against them.
The persisted requirements are not exposed through the public
SnapshotAPI.Consumers therefore cannot inspect a loaded snapshot before building a sandbox
to discover requirements such as
ResolveModuleandLoadModule. They mustalready know the contract or attempt restoration and parse the resulting
mismatch error.
Wrapper runtimes also cannot present a complete requirements API because the
underlying Hyperlight requirements are private.
Proposed change
Expose an immutable view of the host-function requirements recorded by a
Snapshot, including each function name and exact parameter and return types.