Expand description
Common types for representing Lucet module data and metadata.
These types are used both in lucetc
and lucet-runtime
, with values serialized in
bincode
format to the compiled Lucet modules.
Modules§
Macros§
Structs§
- Export
Function - ExportFunction describes an exported function - its internal function index and a name that function has been exported under.
- Function
Handle - Function
Index - FunctionIndex is an identifier for a function, imported, exported, or external. The space of
FunctionIndex is shared for all of these, so
FunctionIndex(N)
may identify exported function #2,FunctionIndex(N + 1)
may identify an internal function, andFunctionIndex(N + 2)
may identify an imported function. - Function
Metadata - Information about the corresponding function.
- Function
Pointer - FunctionPointer serves entirely as a safer way to work with function pointers than as raw u64
or usize values. It also avoids the need to write them as
fn
types, which cannot be freely cast from one to another withas
. If you need to call aFunctionPointer
, useas_usize()
and transmute the resulting usize to afn
type with appropriate signature. - Function
Spec - Global
Spec - A WebAssembly global along with its export specification.
- Heap
Spec - Specifications about the heap of a Lucet module.
- Import
Function - ImportFunction describes an internal function - its internal function index and the name/module pair that function should be found in.
- Linear
Memory Spec - Specification of the linear memory of a module
- Module
Data - The metadata (and some data) for a Lucet module.
- Module
Signature - Public
Key - A
PublicKey
is used to verify signatures. - Signature
- A signature for a function in a wasm module.
- Sparse
Data - A sparse representation of a Lucet module’s initial heap.
- Trap
Manifest - A collection of trap sites, typically obtained from a
single function (see [
FunctionSpec::traps
]) - Trap
Site - Trap information for an address in a compiled function
- Unique
Signature Index - UniqueSignatureIndex names a signature after collapsing duplicate signatures to a single identifier, whereas SignatureIndex is directly what the original module specifies, and may specify duplicates of types that are structurally equal.
Enums§
- Error
- Module data (de)serialization errors.
- Global
- A WebAssembly global is either defined locally, or is defined in relation to a field of another WebAssembly module.
- Global
Def - Definition for a global in this module (not imported).
- Trap
Code - The type of a WebAssembly trap.
- Value
Type