pub unsafe fn package_init(dll: *mut DllInfo, pkg_name: &CStr)Expand description
Initialize a miniextendr R package.
This performs all initialization steps in the correct order:
- Install panic hook for better error messages
- Record main thread ID (and optionally spawn worker thread)
- Assert UTF-8 locale
- Set ALTREP package name
- Register mx_abi C-callables for cross-package trait dispatch
- Register all
#[miniextendr]routines and ALTREP classes - Lock down dynamic symbols
§Safety
Must be called from R’s main thread during R_init_*.
dll must be a valid pointer provided by R.
pkg_name must be a valid null-terminated C string that lives for the
duration of the R session (typically a string literal).