pub(super) struct LinkerState {Show 14 fields
pub(super) engine: Engine,
pub(super) main_module: Module,
pub(super) main_module_dylink_info: DylinkInfo,
pub(super) main_module_memory_base: u64,
pub(super) side_modules: BTreeMap<ModuleHandle, DlModule>,
pub(super) side_modules_by_name: HashMap<PathBuf, ModuleHandle>,
pub(super) next_module_handle: u32,
pub(super) memory_allocator: MemoryAllocator,
pub(super) heap_base: u64,
pub(super) allocated_closure_functions: BTreeMap<u32, bool>,
pub(super) available_closure_functions: Vec<u32>,
pub(super) symbol_resolution_records: HashMap<SymbolResolutionKey, SymbolResolutionResult>,
pub(super) send_pending_operation_barrier: Bus<Arc<Barrier>>,
pub(super) send_pending_operation: Bus<DlOperation>,
}Fields§
§engine: Engine§main_module: Module§main_module_dylink_info: DylinkInfo§main_module_memory_base: u64§side_modules: BTreeMap<ModuleHandle, DlModule>§side_modules_by_name: HashMap<PathBuf, ModuleHandle>§next_module_handle: u32§memory_allocator: MemoryAllocator§heap_base: u64§allocated_closure_functions: BTreeMap<u32, bool>Tracks which slots in the function table are currently used for closures
True if the closure is currently in use, false otherwise.
available_closure_functions: Vec<u32>Slots in the indirect function table that were allocated for closures but are currently not in use. These can be given out without needing to lock all threads.
symbol_resolution_records: HashMap<SymbolResolutionKey, SymbolResolutionResult>§send_pending_operation_barrier: Bus<Arc<Barrier>>§send_pending_operation: Bus<DlOperation>Implementations§
Source§impl LinkerState
impl LinkerState
pub(super) fn allocate_memory( &mut self, store: &mut impl AsStoreMut, memory: &Memory, mem_info: &MemInfo, ) -> Result<u64, MemoryError>
pub(super) fn memory_base(&self, module_handle: ModuleHandle) -> u64
pub(super) fn dylink_info(&self, module_handle: ModuleHandle) -> &DylinkInfo
pub(super) 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>
pub(super) fn load_module_tree( &mut self, module_spec: DlModuleSpec<'_>, link_state: &mut InProgressLinkState, runtime: &Arc<dyn Runtime + Send + Sync + 'static>, wasi_state: &WasiState, runtime_path: &[impl AsRef<str>], calling_module_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 UnsafeUnpin 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Upcastable for T
impl<T> Upcastable for T
Source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
Source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref