pub struct StagedDylib { /* private fields */ }Expand description
Canonical RAII dynamic-library loader. On desktop it stages a unique copy in a private
(0700, per-user, exclusively created) staging directory before calling dlopen (a rebuilt
file at the same path always runs new code; no Windows DLL locks) and unloads before removing
the copy. On Android / iOS it loads the file in place (STAGES_PRIVATE_COPY) unless
MODULE_STAGE_DIR_ENV names a staging root, permitting unchanged bundle re-opens while
refusing reloads whose bytes changed on disk.
Implementations§
Source§impl StagedDylib
impl StagedDylib
pub fn load( dylib_path: &Path, subdir: &str, label: &str, ) -> Result<Self, LoaderError>
pub fn load_symbol( dylib_path: &Path, symbol: &str, subdir: &str, label: &str, ) -> Result<Self, LoaderError>
Sourcepub fn total_staged_loads() -> u64
pub fn total_staged_loads() -> u64
Process-wide count of successful StagedDylib::load operations (used to verify
[INV:multi-surface-shared-dylib] — N surfaces sharing one NvAppModule increment this
counter by exactly 1 per reload generation).
pub fn get_interface(&self) -> NvGetInterfaceFn
Sourcepub fn loaded_copy_path(&self) -> &Path
pub fn loaded_copy_path(&self) -> &Path
The file the OS loaded: the private staged copy on desktop, the resolved source path on mobile.