[][src]Struct cranelift_simplejit::SimpleJITBuilder

pub struct SimpleJITBuilder { /* fields omitted */ }

A builder for SimpleJITBackend.

Methods

impl SimpleJITBuilder[src]

pub fn new() -> Self[src]

Create a new SimpleJITBuilder.

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

Create a new SimpleJITBuilder with an arbitrary target. This is mainly useful for testing.

SimpleJIT requires a TargetIsa configured for non-PIC.

To create a SimpleJITBuilder for native use, use the new constructor instead.

pub fn symbol<K>(&mut self, name: K, ptr: *const u8) -> &Self where
    K: Into<String>, 
[src]

Define a symbol in the internal symbol table.

The JIT will use the symbol table to resolve names that are declared, but not defined, in the module being compiled. A common example is external functions. With this method, functions and data can be exposed to the code being compiled which are defined by the host.

If a symbol is defined more than once, the most recent definition will be retained.

If the JIT fails to find a symbol in its internal table, it will fall back to a platform-specific search (this typically involves searching the current process for public symbols, followed by searching the platform's C runtime).

pub fn symbols<It, K>(&mut self, symbols: It) -> &Self where
    It: IntoIterator<Item = (K, *const u8)>,
    K: Into<String>, 
[src]

Define multiple symbols in the internal symbol table.

Using this is equivalent to calling symbol on each element.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.