Skip to main content

Module init

Module init 

Source
Expand description

Package initialization for miniextendr R packages.

package_init consolidates all initialization steps that were previously scattered across entrypoint.c.in. The miniextendr_init! proc macro generates the R_init_* entry point that calls this function.

Β§Usage

In your crate’s lib.rs:

β“˜
miniextendr_init!(mypkg);

This expands to an extern "C-unwind" fn R_init_mypkg(dll) that calls package_init with the appropriate package name.

Re-exportsΒ§

use crate::Rboolean; πŸ”’
use crate::sys::DllInfo; πŸ”’
use crate::sys::R_forceSymbols; πŸ”’
use crate::sys::R_useDynamicSymbols; πŸ”’
use std::ffi::CStr; πŸ”’

ConstantsΒ§

WRAPPER_GEN_ENV πŸ”’
Env var the Makevars wrapper-gen recipe sets before dyn.loading the freshly-built shared object to generate R/*-wrappers.R.

FunctionsΒ§

package_init⚠
Initialize a miniextendr R package.
wrapper_gen_mode πŸ”’
true when the package was loaded purely for wrapper generation β€” see WRAPPER_GEN_ENV.