Struct DlModule

Source
pub struct DlModule { /* private fields */ }
Expand description

A Lucet module backed by a dynamically-loaded shared object.

Implementations§

Source§

impl DlModule

Source

pub fn load<P: AsRef<Path>>(so_path: P) -> Result<Arc<Self>, Error>

Create a module, loading code from a shared object on the filesystem.

Source

pub fn load_and_verify<P: AsRef<Path>>( so_path: P, pk: PublicKey, ) -> Result<Arc<Self>, Error>

Create a module, loading code from a shared object on the filesystem and verifying it using a public key if one has been supplied.

Trait Implementations§

Source§

impl Module for DlModule

Source§

fn initial_globals_size(&self) -> usize

Calculate the initial size in bytes of the module’s Wasm globals.
Source§

impl ModuleInternal for DlModule

Source§

fn is_instruction_count_instrumented(&self) -> bool

Determine whether this module has been instrumented with additional instructions that monitor the number of wasm operations executed during runtime.
Source§

fn heap_spec(&self) -> Option<&HeapSpec>

Source§

fn globals(&self) -> &[GlobalSpec<'_>]

Get the WebAssembly globals of the module. Read more
Source§

fn get_sparse_page_data(&self, page: usize) -> Option<&[u8]>

Source§

fn sparse_page_data_len(&self) -> usize

Get the number of pages in the sparse page data.
Source§

fn table_elements(&self) -> Result<&[TableElement], Error>

Get the table elements from the module.
Source§

fn get_export_func(&self, sym: &str) -> Result<FunctionHandle, Error>

Source§

fn get_func_from_idx( &self, table_id: u32, func_id: u32, ) -> Result<FunctionHandle, Error>

Source§

fn get_start_func(&self) -> Result<Option<FunctionHandle>, Error>

Source§

fn function_manifest(&self) -> &[FunctionSpec]

Source§

fn addr_details( &self, addr: *const c_void, ) -> Result<Option<AddrDetails>, Error>

Source§

fn get_signature(&self, fn_id: FunctionIndex) -> &Signature

Source§

fn function_handle_from_ptr(&self, ptr: FunctionPointer) -> FunctionHandle

Source§

fn lookup_trapcode(&self, rip: *const c_void) -> Option<TrapCode>

Look up an instruction pointer in the trap manifest. Read more
Source§

fn validate_runtime_spec(&self, limits: &Limits) -> Result<(), Error>

Check that the specifications of the WebAssembly module are valid given certain Limits. Read more
Source§

impl Send for DlModule

Source§

impl Sync for DlModule

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.