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(
&mut self,
name: &str,
module: &[u8],
dl_openable: bool,
) -> Result<&mut Self>
pub fn library( &mut self, name: &str, module: &[u8], dl_openable: bool, ) -> Result<&mut Self>
Add a dynamic library module to this linker.
If dl_openable is true, all of the library’s exports will be added to the dlopen/dlsym lookup table
for runtime resolution.
Sourcepub fn stack_size(&mut self, stack_size: u32) -> &mut Self
pub fn stack_size(&mut self, stack_size: u32) -> &mut Self
Specify size of stack to allocate in the synthesized main module
Sourcepub fn stub_missing_functions(
&mut self,
stub_missing_functions: bool,
) -> &mut Self
pub fn stub_missing_functions( &mut self, stub_missing_functions: bool, ) -> &mut Self
Specify whether to generate trapping stubs for any unresolved imports
Sourcepub fn use_built_in_libdl(&mut self, use_built_in_libdl: bool) -> &mut Self
pub fn use_built_in_libdl(&mut self, use_built_in_libdl: bool) -> &mut Self
Specify whether to use a built-in implementation of dlopen/dlsym.
Sourcepub fn encoder(&mut self) -> &mut ComponentEncoder
pub fn encoder(&mut self) -> &mut ComponentEncoder
Returns a reference to the internal ComponentEncoder that can be
configured.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Linker
impl RefUnwindSafe for Linker
impl Send for Linker
impl Sync for Linker
impl Unpin for Linker
impl UnsafeUnpin 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