pub struct CallIndirectHost {
pub id: u8,
}Expand description
A special opcode to halt interpreter execution and yield control back to the host.
This opcode results in DoneReason::CallIndirectHost where the
id here is shepherded along to the embedder. It’s up to the
embedder to determine what to do with the id and the current
state of registers and the stack.
In Wasmtime this is used to implement interpreter-to-host calls.
This is modeled as a call instruction where the first
parameter is the native function pointer to invoke and all
remaining parameters for the native function are in following
parameter positions (e.g. x1, x2, …). The results of the
host call are then store in x0.
Handling this in Wasmtime is done through a “relocation” which is resolved at link-time when raw bytecode from Cranelift is assembled into the final object that Wasmtime will interpret.
Fields§
§id: u8Implementations§
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for CallIndirectHost
impl<'arbitrary> Arbitrary<'arbitrary> for CallIndirectHost
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§impl Clone for CallIndirectHost
impl Clone for CallIndirectHost
Source§fn clone(&self) -> CallIndirectHost
fn clone(&self) -> CallIndirectHost
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CallIndirectHost
impl Debug for CallIndirectHost
Source§impl Encode for CallIndirectHost
Available on crate feature encode only.
impl Encode for CallIndirectHost
encode only.Source§impl From<CallIndirectHost> for ExtendedOp
impl From<CallIndirectHost> for ExtendedOp
Source§fn from(op: CallIndirectHost) -> Self
fn from(op: CallIndirectHost) -> Self
Source§impl From<CallIndirectHost> for Op
impl From<CallIndirectHost> for Op
Source§fn from(op: CallIndirectHost) -> Self
fn from(op: CallIndirectHost) -> Self
Source§impl PartialEq for CallIndirectHost
impl PartialEq for CallIndirectHost
impl Copy for CallIndirectHost
impl Eq for CallIndirectHost
impl StructuralPartialEq for CallIndirectHost
Auto Trait Implementations§
impl Freeze for CallIndirectHost
impl RefUnwindSafe for CallIndirectHost
impl Send for CallIndirectHost
impl Sync for CallIndirectHost
impl Unpin for CallIndirectHost
impl UnwindSafe for CallIndirectHost
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)