Modules§
- exposed_
runtime exposed_runtime
are the underlying functions we expose to the host from the system. These are functions the runtime exposes to the host to be able to make calls into the system or triggering processes.- host_
runtime host_runtime
is the expected interface which the JS/Host must provide for use with wrapper functions that make it simple and easier to interact with.- internal_
api internal_api
are internal methods, structs, and surfaces that provide core functionalities that we support or that allows making or preparing data to be sent-out or sent-across the API.- value_
quantitization - [
value_quantitzation
] contains various quantitzation methods which exists to take different unit value types returning a more compact representation of those values with a lesser unit type where possible.
Structs§
- Cached
Text - [
CachedText8
] defines a instance of a cached UTF-8 text at some specific location managed by the host runtime identified by the wrapped u64 id. - Call
Params - Completed
Instructions - External
Pointer ExternalPointer
identifies an external handle pointing to a special pointer that is used to control/access an external resource.- FnCallback
- FnDo
Task - FnFrame
Callback - FnInterval
Callback - Frame
Callback List - Group
Return Type Hints GroupReturnTypeHints
represents conversion of underlying type which is a grouping of return values from the host where it represent a batch of return values that should be generated/materialized.- Instructions
Instructions
is a one batch set writer, meaning it encodes a single batch of instruction marked by aOperations::Begin
andOperations::Stop
markers when theInstructions::end
is called.- Internal
Pointer InternalPointer
identifies an external handle pointing to a special pointer that is used to control/access an external resource.- Internal
Reference Registry - Interval
Callback List - Interval
Registry - Memory
Allocation MemoryAllocation
is a thread-safe and copy-cheap handle to a underlying memory location held by aVec<u8>
.- Memory
Allocations - Memory
Id MemoryId
represents a key to a allocation ’ which has a unique generation to denote it’s ownership if the generation differs from the current generation of a given index then that means ownership was already lost and hence cant be used.- Memory
Location MemoryLocation
represents a location in memory where the first value is a pointer to the memory location and the next is the length of the value.- Memory
Pointer MemoryPointer
holds references memory ids for both text and operations.- Memory
Slot MemorySlot
provides a nicer API handle for memory allocation representing one that contains ops code represented as aVec<u8>
and text represent by aVec<u8>
of a utf-8 encoded text.- Schedule
Registry - StrLocation
StrLocation
represent the underlying location of an encoded string which points to the relevant starting index and length from that index location, this then can be applied to any valid memory address that contains the texts to find the relevant portion.- Task
Error Code TaskErrorCode
represents the converted response of anReturnValues::ErrorCode
when its communicated that a async task or function failed.- Wrapped
Item
Enums§
- Argument
Operations ArgumentOperations
representing the argument layout in memory used to represent the different argument blocks a function is to receive.- Binary
Read Error - Group
Return Hint Marker - Guest
Operation Error - JSEncoding
JSEncoding
defines a defining type to help indicate the underlying encoding for a giving text body.- MemOp
Error - Memory
Allocation Error - Memory
Reader Error - Memory
Writer Error - Operations
- Lists all possible encodable operations supported by this crate. This allows us represent different actions and operations with a 1 byte pointer in the range of 0 - 255 (a u8, 8 bits).
- Param
Type Id ParamTypeId
represent the underlying type of value being encoded into a binary stream.- Params
- Return
Encoded ReturnEncoded
represent the type indicating the underlying returned value for an operation.- Return
Hint Marker - Return
Ids ReturnIds
represent the type indicating the underlying returned value for an operation.- Return
Type Hints ReturnTypeHints
represent the potential return values of calling a function- Return
Type Id - [
ReturnValueTypes
] represent the type indicating the underlying returned value for an operation. - Return
Value Error - Return
Value Marker - Return
Values - Returns
Returns
represent the potential return values of calling a function- Three
State ThreeState
represent the fact that some operation can be a single state or two or three states (think:Option
&Result<T>
orResult<Option<T>>
) and we wish to be able to express that clear to users.- Three
State Id ThreeStateId
represent the type indicating the underlying returned value for an operation.- Tick
State - Type
Optimization TypeOptimization
represent potential type optimization that can happen to types represented as a singleu8
(max of 255) numbers. This allows us declare within the format any potential optimization and space saving operation that might have occurred for a giving type, informing the HOST side about so it can correctly decode the underlying content.- Typed
Slice TypedSlice
represent the type of a slice which is sent over. And helps the receiver know what exactly is represented by a slice of u8 array.- WASM
Errors
Constants§
- MOVE_
ONE_ BYTE - MOVE_
ONE_ TWENTY_ EIGHT_ BYTES - MOVE_
SIXTEEN_ BYTES - MOVE_
SIXTY_ FOUR_ BYTES - MOVE_
THIRTY_ TWO_ BYTES
Traits§
- Batch
Encodable BatchEncodable
defines a trait which allows you implement conversion an underlying binary representation of a Batch operation.- Batchable
Batchable
defines a infallible type which can be encoded into aBatchEncodable
implementing type usually a [Batch
].- DoTask
- Frame
Callback - From
Binary FromBinary
provides a basic type to convert from binary data to the definedT
.- Internal
Callback - Interval
Callback - ToBinary
ToBinary
provides a basic type which we can encode as plain binary bytes usually in LittleIndian encoding.