pub struct LibraryModule<G, const TABLE_SIZE: usize> {
pub globals: G,
pub table: Table<TABLE_SIZE>,
}Expand description
A module that does NOT define its own memory (§4.1).
Operates on borrowed memory from the caller, like a shared library using the host process’s address space. Rust’s borrow checker enforces that the library cannot retain the memory reference beyond a call.
G: transpiler-generated globals structTABLE_SIZE: maximum indirect call table entries
Fields§
§globals: GModule-level global variables.
table: Table<TABLE_SIZE>Indirect call table for call_indirect.
Implementations§
Auto Trait Implementations§
impl<G, const TABLE_SIZE: usize> Freeze for LibraryModule<G, TABLE_SIZE>where
G: Freeze,
impl<G, const TABLE_SIZE: usize> RefUnwindSafe for LibraryModule<G, TABLE_SIZE>where
G: RefUnwindSafe,
impl<G, const TABLE_SIZE: usize> Send for LibraryModule<G, TABLE_SIZE>where
G: Send,
impl<G, const TABLE_SIZE: usize> Sync for LibraryModule<G, TABLE_SIZE>where
G: Sync,
impl<G, const TABLE_SIZE: usize> Unpin for LibraryModule<G, TABLE_SIZE>where
G: Unpin,
impl<G, const TABLE_SIZE: usize> UnsafeUnpin for LibraryModule<G, TABLE_SIZE>where
G: UnsafeUnpin,
impl<G, const TABLE_SIZE: usize> UnwindSafe for LibraryModule<G, TABLE_SIZE>where
G: UnwindSafe,
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