Skip to main content

Crate extendr_ffi

Crate extendr_ffi 

Source
Expand description

Low level bindings to R’s C API

extendr-ffi powers the extendr-api library.

Re-exports§

pub use altrep::*;
pub use backports::*;

Modules§

altrep
ALTREP support
backports
Backport functions
secret 🔒
symbols 🔒
Statics representing R Symbols

Structs§

R_CMethodDef
These are very similar to those in Rdynpriv.h, but we maintain them separately to give us more freedom to do some computations on the internal versions that are derived from these definitions.
R_CallMethodDef
R_inpstream_st
R_outpstream_st
Rcomplex
R 4.3 redefined Rcomplex to a union for compatibility with Fortran. But the old definition is compatible both the union version and the struct version. See: https://github.com/extendr/extendr/issues/524
SEXPREC
_DllInfo

Enums§

ParseStatus
PARSE_NULL will not be returned by R_ParseVector
R_pstream_format_t
Rboolean
A C type with enumeration constants FALSE and TRUE defined.
SEXPTYPE
Enum of possible SEXP types
cetype_t
cetype_t is an identifier reseved by POSIX, but it is well established as public. Could remap by a #define though

Statics§

R_BaseEnv⚠
The base environment; formerly R_NilValue
R_BaseNamespace⚠
The (fake) namespace for base
R_BaseSymbol⚠
“base”
R_BlankScalarString⚠
“” as a STRSXP
R_BlankString⚠
“” as a CHARSXP
R_BraceSymbol⚠
“{”
R_Bracket2Symbol⚠
“[[”
R_BracketSymbol⚠
“[”
R_CStackLimit⚠
C stack limit
R_ClassSymbol⚠
“class”
R_DeviceSymbol⚠
“.Device”
R_DimNamesSymbol⚠
“dimnames”
R_DimSymbol⚠
“dim”
R_DollarSymbol⚠
“$”
R_DotsSymbol⚠
“…”
R_DoubleColonSymbol⚠
“::”
R_DropSymbol⚠
“drop”
R_EmptyEnv⚠
An empty environment at the root of the environment tree
R_EvalSymbol⚠
“eval”
R_FunctionSymbol⚠
“function”
R_GlobalEnv⚠
The “global” environment
R_LastvalueSymbol⚠
“.Last.value”
R_LevelsSymbol⚠
“levels”
R_MissingArg⚠
Missing argument marker
R_ModeSymbol⚠
“mode”
R_NaInt⚠
NA_INTEGER:= INT_MIN currently
R_NaN⚠
IEEE NaN
R_NaReal⚠
NA_REAL: IEEE
R_NaRmSymbol⚠
“na.rm”
R_NaString⚠
NA_STRING as a CHARSXP
R_NameSymbol⚠
“name”
R_NamesSymbol⚠
“names”
R_NamespaceEnvSymbol⚠
“.NAMESPACE.”
R_NegInf⚠
IEEE -Inf
R_NilValue⚠
The nil object
R_PackageSymbol⚠
“package”
R_PosInf⚠
IEEE Inf
R_PreviousSymbol⚠
“previous”
R_QuoteSymbol⚠
“quote”
R_RowNamesSymbol⚠
“row.names”
R_SeedsSymbol⚠
“.Random.seed”
R_SortListSymbol⚠
“sort.list”
R_SourceSymbol⚠
“source”
R_SpecSymbol⚠
“spec”
R_Srcref⚠
Current srcref, for debuggers
R_TripleColonSymbol⚠
“:::”
R_TspSymbol⚠
“tsp”
R_dot_Generic⚠
“.Generic”
R_dot_Method⚠
“.Method”
R_dot_defined⚠
“.defined”
R_dot_packageName⚠
“.packageName”
R_dot_target⚠
“.target”

Functions§

CAR⚠
CDR⚠
COMPLEX⚠
COMPLEX_ELT⚠
COMPLEX_GET_REGION⚠
DATAPTR⚠
DATAPTR_OR_NULL⚠
DATAPTR_RO⚠
GetRNGstate⚠
INTEGER⚠
INTEGER_ELT⚠
INTEGER_GET_REGION⚠
INTEGER_IS_SORTED⚠
INTEGER_NO_NA⚠
LENGTH⚠
LOGICAL⚠
LOGICAL_ELT⚠
LOGICAL_GET_REGION⚠
MARK_NOT_MUTABLE⚠
PRINTNAME⚠
PutRNGstate⚠
RAW⚠
RAW_GET_REGION⚠
REAL⚠
REAL_ELT⚠
REAL_GET_REGION⚠
REAL_IS_SORTED⚠
REAL_NO_NA⚠
REprintf⚠
R_CHAR⚠
srcref related functions
R_CleanTempDir⚠
R_ClearExternalPtr⚠
R_ExternalPtrAddr⚠
R_ExternalPtrProtected⚠
R_ExternalPtrTag⚠
R_GetCurrentEnv⚠
R_GetCurrentSrcref⚠
srcref related functions
R_GetSrcFilename⚠
R_IsNA⚠
NA_STRING is a SEXP, so defined in Rinternals.h
R_IsNaN⚠
R_IsNamespaceEnv⚠
R_IsPackageEnv⚠
R_MakeExternalPtr⚠
External pointer interface
R_MakeUnwindCont⚠
R_NamespaceEnvSpec⚠
R_NewEnv⚠
Environment and Binding Features
R_PackageEnvName⚠
R_ParseVector⚠
R_PreserveObject⚠
preserve objects across GCs
R_RegisterCFinalizerEx⚠
R_ReleaseObject⚠
R_RunExitFinalizers⚠
R_Serialize⚠
R_SetExternalPtrAddr⚠
R_SetExternalPtrProtected⚠
R_SetExternalPtrTag⚠
R_Unserialize⚠
R_UnwindProtect⚠
R_compute_identical⚠
R_do_slot⚠
R_do_slot_assign⚠
R_finite⚠
R_forceSymbols⚠
R_has_slot⚠
R_registerRoutines⚠
R_tryEval⚠
R_tryEvalSilent⚠
R_unif_index⚠
R_useDynamicSymbols⚠
Rf_GetArrayDimnames⚠
Rf_GetColNames⚠
Rf_GetRowNames⚠
Rf_NoDevices⚠
Rf_NumDevices⚠
Rf_PairToVectorList⚠
Rf_PrintValue⚠
Rf_ScalarInteger⚠
Rf_VectorToPairList⚠
Rf_allocMatrix⚠
Rf_allocVector⚠
Rf_asChar⚠
Rf_asCharacterFactor⚠
Rf_coerceVector⚠
Rf_conformable⚠
Rf_cons⚠
Rf_defineVar⚠
Rf_dimgets⚠
Rf_dimnamesgets⚠
Rf_duplicate⚠
Rf_error⚠
Rf_errorcall⚠
Rf_findFun⚠
Rf_getAttrib⚠
Rf_initialize_R⚠
Rf_install⚠
Rf_isArray⚠
Rf_isComplex⚠
Rf_isEnvironment⚠
Rf_isExpression⚠
Rf_isFactor⚠
Rf_isFunction⚠
Rf_isInteger⚠
Rf_isLanguage⚠
Rf_isList⚠
Rf_isLogical⚠
Rf_isMatrix⚠
Rf_isNewList⚠
Rf_isNull⚠
Rf_isNumber⚠
Rf_isObject⚠
Rf_isPrimitive⚠
Rf_isReal⚠
Rf_isS4⚠
Safety
Rf_isString⚠
Rf_isSymbol⚠
Rf_isTs⚠
Rf_isUserBinop⚠
Rf_isVector⚠
Rf_isVectorAtomic⚠
Rf_isVectorList⚠
Rf_isVectorizable⚠
Rf_lang1⚠
Rf_lcons⚠
Rf_mkCharLenCE⚠
Rf_namesgets⚠
Rf_ncols⚠
Rf_nrows⚠
Rf_protect⚠
Rf_runif⚠
Rf_setAttrib⚠
Rf_unprotect⚠
Rf_warningcall⚠
Rf_xlength⚠
Rf_xlengthgets⚠
Rprintf⚠
SETCDR⚠
SETLEVELS⚠
SET_INTEGER_ELT⚠
SET_OBJECT⚠
SET_REAL_ELT⚠
SET_STRING_ELT⚠
SET_TAG⚠
SET_VECTOR_ELT⚠
STRING_ELT⚠
STRING_IS_SORTED⚠
STRING_NO_NA⚠
STRING_PTR_RO⚠
TAG⚠
TYPEOF⚠
Returns the SEXPTYPE of x
VECTOR_ELT⚠
XLENGTH⚠
setup_Rmainloop⚠

Type Aliases§

DL_FUNC
Called with a variable argument set after casting to a compatible function pointer.
DllInfo
Int32
R_CFinalizer_t
Finalization interface
R_ExternalMethodDef
R_FortranMethodDef
R_NativePrimitiveArgType
R_inpstream_t
R_len_t
type for length of (standard, not long) vectors etc
R_outpstream_t
R_pstream_data_t
R_xlen_t
R_xlen_t is defined as int on 32-bit platforms, and that confuses Rust. Keeping it always as ptrdiff_t works fine even on 32-bit.
Rbyte
SEXP