pub struct RuntimeBuilder { /* private fields */ }
Expand description
The builder of Runtime
. It is used to configure the runtime.
Get one via Runtime::builder()
Implementations§
Source§impl RuntimeBuilder
impl RuntimeBuilder
Sourcepub fn use_system_allocator(self) -> RuntimeBuilder
pub fn use_system_allocator(self) -> RuntimeBuilder
system allocator mode allocate memory from system allocator for runtime consumed memory
Sourcepub fn use_memory_pool(self, pool: Vec<u8>, pool_size: u32) -> RuntimeBuilder
pub fn use_memory_pool(self, pool: Vec<u8>, pool_size: u32) -> RuntimeBuilder
system allocator mode allocate memory from pool, as a pre-allocated buffer, for runtime consumed memory
Sourcepub fn run_as_interpreter(self) -> RuntimeBuilder
pub fn run_as_interpreter(self) -> RuntimeBuilder
use interpreter mode
Sourcepub fn run_as_llvm_jit(self, opt_level: u32, size_level: u32) -> RuntimeBuilder
pub fn run_as_llvm_jit(self, opt_level: u32, size_level: u32) -> RuntimeBuilder
use llvm-jit mode
Sourcepub fn register_host_function(
self,
function_name: &str,
function_ptr: *mut c_void,
) -> RuntimeBuilder
pub fn register_host_function( self, function_name: &str, function_ptr: *mut c_void, ) -> RuntimeBuilder
register a host function
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuntimeBuilder
impl RefUnwindSafe for RuntimeBuilder
impl !Send for RuntimeBuilder
impl !Sync for RuntimeBuilder
impl Unpin for RuntimeBuilder
impl UnwindSafe for RuntimeBuilder
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