Expand description
Unified C wrapper generation for standalone functions and impl methods.
This module provides shared infrastructure for generating C wrappers that:
- Handle worker thread vs main thread execution strategies
- Perform parameter conversion from SEXP to Rust types
- Convert Rust return values back to SEXP
- Properly handle panics and R errors
The same infrastructure is used by both #[miniextendr] on standalone functions
and #[miniextendr(env|r6|s3|s4|s7)] on impl blocks.
Structs§
- CWrapper
Context - All information needed to generate a C wrapper function for an R-exported Rust item.
- CWrapper
Context Builder - Builder for
CWrapperContext.
Enums§
- Return
Handling - Strategy for converting a Rust return value into an R
SEXP. - Thread
Strategy - Thread execution strategy for C wrappers.
Functions§
- detect_
return_ handling - Detects the appropriate
ReturnHandlingstrategy from a function’s return type. - detect_
return_ 🔒handling_ from_ type - Determines the
ReturnHandlingvariant for a concretesyn::Type. - detect_
return_ handling_ standalone_ fn - Detects
ReturnHandlingfor the standalone-#[miniextendr]-fn path. - first_
type_ 🔒argument - Extracts the first generic type argument from a path segment’s angle-bracketed arguments.