[][src]Struct wasmtime_jit::Context

pub struct Context { /* fields omitted */ }

A convenient context for compiling and executing WebAssembly instances.

Methods

impl Context[src]

pub fn new(compiler: Box<Compiler>) -> Self[src]

Construct a new instance of Context.

pub fn debug_info(&self) -> bool[src]

Get debug_info settings.

pub fn set_debug_info(&mut self, value: bool)[src]

Set debug_info settings.

pub fn with_isa(isa: Box<dyn TargetIsa>) -> Self[src]

Construct a new instance of Context with the given target.

pub fn with_features(self, features: Features) -> Self[src]

Construct a new instance with the given features from the current Context

pub fn get_instance(
    &mut self,
    instance_name: &str
) -> Result<&mut InstanceHandle, UnknownInstance>
[src]

Return the instance associated with the given name.

pub fn instantiate_module(
    &mut self,
    instance_name: Option<String>,
    data: &[u8]
) -> Result<InstanceHandle, ActionError>
[src]

Instantiate a module instance and register the instance.

pub fn optionally_name_instance(
    &mut self,
    name: Option<String>,
    instance: InstanceHandle
)
[src]

If name isn't None, register it for the given instance.

pub fn name_instance(&mut self, name: String, instance: InstanceHandle)[src]

Register a name for the given instance.

pub fn alias(
    &mut self,
    name: &str,
    as_name: String
) -> Result<(), UnknownInstance>
[src]

Register an additional name for an existing registered instance.

pub fn invoke_named(
    &mut self,
    instance_name: &str,
    field: &str,
    args: &[RuntimeValue]
) -> Result<ActionOutcome, ContextError>
[src]

Invoke an exported function from a named instance.

pub fn invoke(
    &mut self,
    instance: &mut InstanceHandle,
    field: &str,
    args: &[RuntimeValue]
) -> Result<ActionOutcome, ActionError>
[src]

Invoke an exported function from an instance.

pub fn get_named(
    &mut self,
    instance_name: &str,
    field: &str
) -> Result<ActionOutcome, ContextError>
[src]

Get the value of an exported global variable from an instance.

pub fn get(
    &mut self,
    instance: &InstanceHandle,
    field: &str
) -> Result<ActionOutcome, ActionError>
[src]

Get the value of an exported global variable from an instance.

pub fn inspect_memory<'instance>(
    &self,
    instance: &'instance InstanceHandle,
    field_name: &str,
    start: usize,
    len: usize
) -> Result<&'instance [u8], ActionError>
[src]

Get a slice of memory from an instance.

pub fn get_global_exports(
    &mut self
) -> Rc<RefCell<HashMap<String, Option<Export>>>>
[src]

Return a handle to the global_exports mapping, needed by some modules for instantiation.

Auto Trait Implementations

impl Unpin for Context

impl !Send for Context

impl !Sync for Context

impl !RefUnwindSafe for Context

impl !UnwindSafe for Context

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self