Skip to main content

ensure_loader_hook

Function ensure_loader_hook 

Source
pub fn ensure_loader_hook()
Available on x86-64 and crate feature coreclr only.
Expand description

Installs the loader hook (dlopen / LoadLibraryExW) so that the runtime’s library load is detected as early as possible.

Safe to call more than once — subsequent calls are no-ops. Call it from .init_array / ctor() when the mod needs the CLR but registers the on_clr_init callback later (e.g. from a separate thread).