Skip to main content

Crate hyperlight_wasm

Crate hyperlight_wasm 

Source
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::Error from a string literal or format string

Structs§

HostFunction
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>.
LoadedWasmSandbox
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::load to identify snapshots inside an OCI Image Layout directory. Re-exported here so downstream crates do not need a direct dependency on hyperlight-host. A sha256 content digest in canonical sha256:<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::load to identify snapshots inside an OCI Image Layout directory. Re-exported here so downstream crates do not need a direct dependency on hyperlight-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.
ProtoWasmSandbox
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.
SandboxBuilder
A builder for WasmSandbox
Snapshot
A snapshot of the memory of a sandbox at a given point in time. A wrapper around a SharedMemory reference and a snapshot of the memory therein
WasmSandbox
A sandbox with just the Wasm engine loaded into memory. WasmSandboxes are not yet ready to execute guest functions.

Enums§

HyperlightError
The error type for Hyperlight operations The error type for Hyperlight operations
OciReference
OCI Image Layout reference types used by Snapshot::save / Snapshot::load to identify snapshots inside an OCI Image Layout directory. Re-exported here so downstream crates do not need a direct dependency on hyperlight-host. Names one snapshot in an OCI Image Layout, either by tag or by content digest.
SandboxStatus
The lifecycle state of a sandbox. The lifecycle state of a MultiUseSandbox.

Traits§

InterruptHandle
Handle for interrupting guest execution A trait for handling interrupts to a sandbox’s vcpu
ParameterTuple
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
SupportedReturnType
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 true if a suitable hypervisor is available. If this returns false, no hypervisor-backed sandboxes can be created.

Type Aliases§

ParameterValue
The container to store the value of a single parameter to a guest function.
Result
The Result of a function call
ReturnType
The type of the return value from a guest function call.
ReturnValue
The container to store the return value from a guest function call.