Expand description
Automatic registration internals.
Items annotated with #[miniextendr] self-register at link time.
The C entrypoint calls registry::miniextendr_register_routines to
finalize registration with R. Users donβt interact with this module.
Automatic registration for miniextendr.
Every #[miniextendr] item self-registers at link time. package_init()
(generated by miniextendr_init!) calls miniextendr_register_routines
during R_init_* to finalize registration with R. Users never interact
with this module.
Re-exportsΒ§
pub use _linkme_macro_MX_CALL_DEFS as MX_CALL_DEFS;π»pub use _linkme_macro_MX_R_WRAPPERS as MX_R_WRAPPERS;π»pub use _linkme_macro_MX_ALTREP_REGISTRATIONS as MX_ALTREP_REGISTRATIONS;π»pub use _linkme_macro_MX_TRAIT_DISPATCH as MX_TRAIT_DISPATCH;π»pub use _linkme_macro_MX_MATCH_ARG_CHOICES as MX_MATCH_ARG_CHOICES;π»pub use _linkme_macro_MX_MATCH_ARG_PARAM_DOCS as MX_MATCH_ARG_PARAM_DOCS;π»pub use _linkme_macro_MX_CLASS_NAMES as MX_CLASS_NAMES;π»pub use _linkme_macro_MX_S7_SIDECAR_PROPS as MX_S7_SIDECAR_PROPS;π»
StructsΒ§
- Altrep
Registration - ALTREP class registration entry: fn pointer +
#[no_mangle]symbol name. - Class
Name Entry - Entry mapping a Rust type name to its R-visible class name and class system.
- Match
ArgChoices Entry - Entry for replacing match_arg placeholder defaults with actual choices.
- Match
ArgParam DocEntry - Entry for replacing match_arg
@paramdoc placeholders with human-readable choice descriptions. - RWrapper
Entry - R wrapper code with priority for ordering.
- Sidecar
Prop Entry - Entry documenting a sidecar (
#[r_data]) property on an S7 ExternalPtr type. - Trait
Dispatch Entry - Trait dispatch entry mapping (concrete_tag, trait_tag) β vtable.
EnumsΒ§
- RWrapper
Priority - Ordering priority for R wrapper code fragments.
StaticsΒ§
- MX_
ALTREP_ REGISTRATIONS - ALTREP class registration entries, called once at package init.
- MX_
CALL_ DEFS - R
.Callmethod registrations (function + method C wrappers). - MX_
CLASS_ NAMES - Class name entries mapping Rust type names to R-visible class names. Host-only.
- MX_
MATCH_ ARG_ CHOICES - Match-arg choices entries for R wrapper post-processing. Host-only.
- MX_
MATCH_ ARG_ PARAM_ DOCS - Match-arg
@paramdoc entries for R wrapper post-processing. Host-only. - MX_
R_ WRAPPERS - R wrapper code fragments with priority for ordering. Host-only.
- MX_
S7_ SIDECAR_ PROPS - S7 sidecar property documentation entries. Host-only.
- MX_
TRAIT_ DISPATCH - Trait dispatch entries for
universal_query.
FunctionsΒ§
- altrep_
regs π - call_
defs π - Native: read directly from the linkme distributed slice.
wasm32: read from a
OnceLockpopulated byinstall_wasm_runtime_slices. - collect_
r_ wrappers - Collect all R wrapper entries, sorted by priority and deduplicated.
- find_
substr π - Find the first occurrence of
needleinhaystack[from..]. Returns the absolute index inhaystack, orNone. - has_
no_ πrd_ tag - Check if an R wrapper fragment has
@noRd. - has_
rdname_ πtag - Check if an R wrapper fragment already has an
@rdnametag. - inject_
rdname π - Inject
#' @rdname <value>(and@titleif missing) into an R wrapper fragment. Inserts before the first@export/@keywords/@sourceline, or after the last roxygen line. - memchr π
- Find the first byte equal to
needleinhaystack[from..]. Returns the absolute index, orNone. - miniextendr_
register_ βroutines - Register all
#[miniextendr]routines and ALTREP classes with R. - miniextendr_
write_ βwasm_ registry - C-callable entry point for
wasm_registry.rsgeneration via cdylib. - miniextendr_
write_ βwrappers - C-callable entry point for R wrapper generation via cdylib.
- normalize_
source_ πlocs - Replace every
(<stem>.rs:LINE:COL)occurrence with(<stem>.rs:_:_). - rdname_
from_ πsource_ file - Derive an
@rdnamevalue from a source file path. - rotate_
choices_ πfor_ default - Rotate a comma-separated quoted-choice string so
preferredis first. - scan_
digits π - Advance past a run of ASCII digits starting at
haystack[from]. Returns the absolute index of the first non-digit byte, orNoneif there are no digits atfrom(empty run is not valid). - sort_
s7_ πclasses - Sort S7 class definitions so parents come before children.
- trait_
dispatch π - universal_
query β - Universal query function for trait dispatch.
- wrappers_
semantically_ πequal - Returns
truewhenaandbare equal after normalising away(<file>.rs:LINE:COL)positional suffixes in source-attribution comments. - write_
r_ wrappers_ to_ file - Write all R wrapper entries to a file.