Skip to main content

Module ccall

Module ccall 

Source
Expand description

§Direct FFI to mx_abi Functions

This module provides Rust wrappers around the #[no_mangle] functions defined in mx_abi.rs, which is compiled into each package’s static library.

§Functions

FunctionPurpose
mx_wrapWrap *mut mx_erased in R’s EXTPTRSXP
mx_getExtract *mut mx_erased from EXTPTRSXP
mx_queryQuery for interface vtable by tag

§Linkage

Each package includes mx_abi.rs in its staticlib, so these symbols are resolved at link time — no R_GetCCallable indirection needed.

§Thread Safety

All wrapper functions must be called from R’s main thread.

Modules§

ffi 🔒

Functions§

mx_get
Extract an erased object pointer from an R external pointer.
mx_query
Query an object for an interface vtable by tag.
mx_query_as
Query an object for an interface and return a typed view.
mx_wrap
Wrap an erased object pointer in an R external pointer.