pub enum HostCall {
ArrayCall,
Builtin(BuiltinFunctionIndex),
ComponentLowerImport,
ComponentBuiltin(ComponentBuiltinFunctionIndex),
}
Expand description
Enumeration of all possible ways that wasm may execute code in the host.
This type is intended to be serialized into a 32-bit index (or smaller) and is used by Pulley for example to identify how transitions from the guest to the host are performed.
Variants§
ArrayCall
An “array call” is being done which means that the wasm is calling the
host using the array calling convention (e.g. VMArrayCallNative
).
Builtin(BuiltinFunctionIndex)
A builtin function, e.g. for memory.grow
, is being called. Each
builtin has its own ABI.
ComponentLowerImport
A lowered component function is being called. This is done by a trampoline generated by Cranelift and is distinct from the array calling convention.
This correspond to VMLoweringCallee
.
ComponentBuiltin(ComponentBuiltinFunctionIndex)
A builtin function, but specifically for components. For example string transcoders.
Implementations§
Trait Implementations§
Source§impl From<BuiltinFunctionIndex> for HostCall
impl From<BuiltinFunctionIndex> for HostCall
Source§fn from(idx: BuiltinFunctionIndex) -> HostCall
fn from(idx: BuiltinFunctionIndex) -> HostCall
Converts to this type from the input type.
Source§impl From<ComponentBuiltinFunctionIndex> for HostCall
impl From<ComponentBuiltinFunctionIndex> for HostCall
Source§fn from(idx: ComponentBuiltinFunctionIndex) -> HostCall
fn from(idx: ComponentBuiltinFunctionIndex) -> HostCall
Converts to this type from the input type.
Source§impl Ord for HostCall
impl Ord for HostCall
Source§impl PartialOrd for HostCall
impl PartialOrd for HostCall
impl Copy for HostCall
impl Eq for HostCall
impl StructuralPartialEq for HostCall
Auto Trait Implementations§
impl Freeze for HostCall
impl RefUnwindSafe for HostCall
impl Send for HostCall
impl Sync for HostCall
impl Unpin for HostCall
impl UnwindSafe for HostCall
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.