struct LinkerState {
main_module: Module,
main_module_dylink_info: DylinkInfo,
side_modules: BTreeMap<ModuleHandle, DlModule>,
side_modules_by_name: HashMap<PathBuf, ModuleHandle>,
next_module_handle: u32,
memory_allocator: MemoryAllocator,
heap_base: u64,
symbol_resolution_records: HashMap<SymbolResolutionKey, SymbolResolutionResult>,
send_pending_operation_barrier: Bus<Arc<Barrier>>,
send_pending_operation: Bus<DlOperation>,
}
Fields§
§main_module: Module
§main_module_dylink_info: DylinkInfo
§side_modules: BTreeMap<ModuleHandle, DlModule>
§side_modules_by_name: HashMap<PathBuf, ModuleHandle>
§next_module_handle: u32
§memory_allocator: MemoryAllocator
§heap_base: u64
§symbol_resolution_records: HashMap<SymbolResolutionKey, SymbolResolutionResult>
§send_pending_operation_barrier: Bus<Arc<Barrier>>
§send_pending_operation: Bus<DlOperation>
Implementations§
Source§impl LinkerState
impl LinkerState
fn allocate_memory( &mut self, store: &mut impl AsStoreMut, memory: &Memory, mem_info: &MemInfo, ) -> Result<u64, MemoryError>
fn memory_base(&self, module_handle: ModuleHandle) -> u64
fn dylink_info(&self, module_handle: ModuleHandle) -> &DylinkInfo
fn resolve_symbols( &self, group: &InstanceGroupState, store: &mut impl AsStoreMut, module: &Module, module_handle: ModuleHandle, link_state: &mut InProgressLinkState, well_known_imports: &[(&str, &str, u64)], ) -> Result<(), LinkError>
fn resolve_env_symbol( &self, group: &InstanceGroupState, import: &ImportType, store: &impl AsStoreRef, ) -> Result<InProgressSymbolResolution, LinkError>
fn resolve_got_mem_symbol( &self, group: &InstanceGroupState, import: &ImportType, store: &impl AsStoreRef, ) -> Result<InProgressSymbolResolution, LinkError>
fn resolve_got_func_symbol( &self, group: &InstanceGroupState, import: &ImportType, store: &impl AsStoreRef, ) -> Result<InProgressSymbolResolution, LinkError>
fn load_module_tree( &mut self, module_path: impl AsRef<Path>, link_state: &mut InProgressLinkState, runtime: &Arc<dyn Runtime + Send + Sync + 'static>, wasi_state: &WasiState, library_path: Option<&[impl AsRef<Path>]>, ) -> Result<ModuleHandle, LinkError>
Auto Trait Implementations§
impl Freeze for LinkerState
impl !RefUnwindSafe for LinkerState
impl Send for LinkerState
impl Sync for LinkerState
impl Unpin for LinkerState
impl !UnwindSafe for LinkerState
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn