Struct wit_component::Linker
source · pub struct Linker { /* private fields */ }
Expand description
Builder type for composing dynamic library modules into a component
Implementations§
source§impl Linker
impl Linker
sourcepub fn library(
self,
name: &str,
module: &[u8],
dl_openable: bool
) -> Result<Self>
pub fn library( self, name: &str, module: &[u8], dl_openable: bool ) -> Result<Self>
Add a dynamic library module to this linker.
If dl_openable
is true, all of the libraries exports will be added to the dlopen
/dlsym
lookup table
for runtime resolution.
sourcepub fn adapter(self, name: &str, module: &[u8]) -> Result<Self>
pub fn adapter(self, name: &str, module: &[u8]) -> Result<Self>
Add an adapter to this linker.
See crate::encoding::ComponentEncoder::adapter for details.
sourcepub fn validate(self, validate: bool) -> Self
pub fn validate(self, validate: bool) -> Self
Specify whether to validate the resulting component prior to returning it
sourcepub fn stack_size(self, stack_size: u32) -> Self
pub fn stack_size(self, stack_size: u32) -> Self
Specify size of stack to allocate in the synthesized main module
sourcepub fn stub_missing_functions(self, stub_missing_functions: bool) -> Self
pub fn stub_missing_functions(self, stub_missing_functions: bool) -> Self
Specify whether to generate trapping stubs for any unresolved imports
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Linker
impl Send for Linker
impl Sync for Linker
impl Unpin for Linker
impl UnwindSafe for Linker
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