Expand description
This crate provides a Hyperlight implementation for WebAssembly (Wasm) guest code.
Modules§
- build_
info - provides details about the build
Macros§
- new_
error - Create a generic HyperlightError
Creates a
HyperlightError::Errorfrom a string literal or format string
Structs§
- Host
Function - A host function that can be registered with a sandbox
A representation of a host function.
This is a thin wrapper around a
Fn(Args) -> Result<Output>. - Loaded
Wasm Sandbox - A sandbox that has both a Wasm engine and an arbitrary Wasm module loaded into memory.
- OciDigest
- OCI Image Layout reference types used by
Snapshot::save/Snapshot::loadto identify snapshots inside an OCI Image Layout directory. Re-exported here so downstream crates do not need a direct dependency onhyperlight-host. A sha256 content digest in canonicalsha256:<64 lowercase hex>form, identifying one snapshot by the bytes of its manifest. Names that snapshot for loading even when no tag points at it. - OciTag
- OCI Image Layout reference types used by
Snapshot::save/Snapshot::loadto identify snapshots inside an OCI Image Layout directory. Re-exported here so downstream crates do not need a direct dependency onhyperlight-host. A tag naming one snapshot inside an OCI Image Layout directory. Used to save a snapshot under a name and to load it back by that same name. - Proto
Wasm Sandbox - A Hyperlight Sandbox with no Wasm run time loaded and no guest module code loaded. This is used to register new host functions that can be called by guest code.
- Sandbox
Builder - A builder for WasmSandbox
- Snapshot
- A snapshot of the memory of a sandbox at a given point in time.
A wrapper around a
SharedMemoryreference and a snapshot of the memory therein - Wasm
Sandbox - A sandbox with just the Wasm engine loaded into memory.
WasmSandboxes are not yet ready to execute guest functions.
Enums§
- Hyperlight
Error - The error type for Hyperlight operations The error type for Hyperlight operations
- OciReference
- OCI Image Layout reference types used by
Snapshot::save/Snapshot::loadto identify snapshots inside an OCI Image Layout directory. Re-exported here so downstream crates do not need a direct dependency onhyperlight-host. Names one snapshot in an OCI Image Layout, either by tag or by content digest. - Sandbox
Status - The lifecycle state of a sandbox.
The lifecycle state of a
MultiUseSandbox.
Traits§
- Interrupt
Handle - Handle for interrupting guest execution A trait for handling interrupts to a sandbox’s vcpu
- Parameter
Tuple - Trait bound for parameter tuples passed to guest/host functions A trait to describe the tuple of parameters that a host function can take.
- Registerable
- Trait for types that can register host functions A sandbox on which (primitive) host functions can be registered
- Supported
Return Type - Trait bound for return types from guest/host functions This is a marker trait that is used to indicate that a type is a valid Hyperlight return type.
Functions§
- get_
build_ info - Get the build information for this version of hyperlight-wasm
- get_
wasmtime_ version - Get the wasmtime version used by this version of hyperlight-wasm
- is_
hypervisor_ present - Check if there is a hypervisor present
Returns
trueif a suitable hypervisor is available. If this returnsfalse, no hypervisor-backed sandboxes can be created.
Type Aliases§
- Parameter
Value - The container to store the value of a single parameter to a guest function.
- Result
- The Result of a function call
- Return
Type - The type of the return value from a guest function call.
- Return
Value - The container to store the return value from a guest function call.