Reference page
Feature Flags Reference
miniextendr-api uses Cargo feature flags to enable optional integrations. Only default features are enabled automatically.
miniextendr-api uses Cargo feature flags to enable optional integrations.
Only default features are enabled automatically.
πQuick Reference
| Feature | What it enables | Dependencies added |
|---|---|---|
| Default | ||
doc-lint | Build-time lint checking #[miniextendr] source-level attributes | (forwarded to miniextendr-macros) |
refcount-fast-hash | Fast hasher for refcount protect arenas | ahash |
| Core / R Integration | ||
nonapi | Non-API R symbols (stack controls, mutable DATAPTR) | (none) |
rayon | Parallel iterators via Rayon | rayon |
worker-thread | Dedicated worker thread for Rust code execution | (none) |
connections | Experimental custom R connection framework | (none) |
indicatif | Progress bars via R console | indicatif (implies nonapi) |
vctrs | vctrs C API + #[derive(Vctrs)] macro | (forwarded to miniextendr-macros) |
| Serialization | ||
serde | Direct Rust-R serialization (RSerializeNative, RDeserializeNative) | serde |
serde_json | JSON string serialization (RSerialize, RDeserialize) | serde, serde_json |
toml | TOML value conversions | toml |
| Matrix / Array | ||
ndarray | N-dimensional array conversions (Array1..Array6, views) | ndarray |
nalgebra | Linear algebra types (DVector, DMatrix, SVector, SMatrix) | nalgebra |
| Numeric Types | ||
num-bigint | Arbitrary-precision integers (BigInt, BigUint) | num-bigint, num-integer |
rust_decimal | Fixed-point decimals (Decimal) | rust_decimal |
ordered-float | NaN-orderable floats (OrderedFloat<f64>) | ordered-float |
num-complex | Complex numbers (Complex<f64>) | num-complex |
| Adapter Traits | ||
num-traits | Generic numeric operations (RNum, RSigned, RFloat) | num-traits |
bytes | Byte buffer operations (RBuf, RBufMut) | bytes |
| String / Text | ||
uuid | UUID conversions (Uuid, Vec<Uuid>) | uuid (with v4 feature) |
regex | Compiled regex from R patterns (Regex) | regex |
url | Validated URL conversions (Url, Vec<Url>) | url |
aho-corasick | Fast multi-pattern string search | aho-corasick |
| Date / Time | ||
time | OffsetDateTime, Date, Duration conversions | time (with formatting/parsing/macros) |
| Random Number Generation | ||
rand | Wraps Rβs RNG with rand traits (RRng) | rand |
rand_distr | Additional distributions (Normal, Exp, etc.) | rand, rand_distr |
| Collections | ||
indexmap | Order-preserving maps (IndexMap<String, T>) | indexmap |
tinyvec | Small-vector optimization (TinyVec, ArrayVec) | tinyvec (with alloc) |
| Either / Sum Types | ||
either | Either<L, R> sum type conversions | either |
| Binary Serialization | ||
borsh | Borsh binary serialization (Borsh<T> wrapper) | borsh (with derive) |
| Bit Manipulation | ||
bitflags | Bitflags-integer conversions (RFlags<T>) | bitflags |
bitvec | Bit vector-logical conversions (RBitVec) | bitvec |
| Binary Data | ||
raw_conversions | POD types via bytemuck (Raw<T>, RawSlice<T>) | bytemuck (with derive) |
sha2 | SHA-256/SHA-512 hashing helpers | sha2 |
| Formatting | ||
tabled | ASCII/Unicode table formatting | tabled |
| Diagnostics | ||
materialization-tracking | Logs ALTREP materializations for diagnostics | (none) |
macro-coverage | Macro expansion coverage module for auditing | (none) |
πDefault Features
πdoc-lint
Enables the build-time lint that checks #[miniextendr] source-level attributes
for consistency. Warns on missing or mismatched annotations.
Forwarded to miniextendr-macros/doc-lint. Disable with default-features = false if
the lint causes issues during development.
πrefcount-fast-hash
Uses ahash instead of the standard SipHash for refcount protect arenas, improving
throughput on large collections of protected R objects. Not DOS-resistant, but this is
fine for internal arena use.
πCore / R Integration Features
πnonapi
Enables access to non-API R symbols that are not part of Rβs public C API. These
symbols may change between R versions and will cause R CMD check warnings.
What it unlocks:
DATAPTRβ mutable data pointer (preferDATAPTR_ROwhen possible)R_curErrorBufβ current R error message bufferR_CStackStart,R_CStackLimit,R_CStackDirβ stack checking controlsscope_with_r(),spawn_with_r(),with_stack_checking_disabled()β thread safety utilities
See NONAPI.md for the full tracking list.
πworker-thread
Enables the dedicated worker thread infrastructure. Without this feature, run_on_worker()
and with_r_thread() are lightweight inline stubs that execute closures directly on the
calling thread (no thread dispatch).
With the feature enabled:
miniextendr_runtime_init()spawns a dedicated worker thread with bidirectional channelsrun_on_worker(f)dispatchesfto the worker thread, returnsResult<T, String>with_r_thread(f)routesfback to Rβs main thread from the worker
Without the feature (the default):
miniextendr_runtime_init()only records the main thread IDrun_on_worker(f)βOk(f())(inline)with_r_thread(f)βf()(inline, panics if not on main thread)
The default-worker feature implies worker-thread.
πrayon
Parallel iterators via the Rayon crate, with R-safe interop.
Provides:
RParallelIteratorβ adapter trait for exposing parallel iterators to RRParallelExtendβ parallel collection buildingwith_r_vec()β zero-copy parallel fill into R vectorswith_r_matrix()β parallel matrix fillreduce()β parallel reductions returning R scalars
See RAYON.md for the full guide.
πconnections
Experimental R connection framework. Wraps Rβs internal connection system for creating custom readable/writable connections from Rust types.
Warning: R explicitly reserves the right to change the connection ABI without a compatibility layer. A compile-time version check catches mismatches. Gated behind this feature flag to make the instability opt-in.
Provides:
RConnectionImpltrait β implement to define custom connection behaviorRCustomConnectionbuilder β configure and create R connection objectsstd::ioadapters (IoRead,IoWrite,IoReadWrite,IoReadWriteSeek,IoBufRead)RConnectionIobuilder β auto-wraps anystd::iotype with zero boilerplate- Helper functions:
get_connection(),read_connection(),write_connection()
See CONNECTIONS.md for the full guide with examples.
πindicatif
Progress bars rendered in the R console via the indicatif crate. Output is routed
through ptr_R_WriteConsoleEx (a non-API symbol), so this feature implies nonapi.
All output is a no-op when called off the R main thread.
Provides:
progress::RTermβTermLikeimplementation for R console outputprogress::RStreamβ stdout/stderr target selection- Convenience constructors:
term_like_stdout(),term_like_stderr(),term_like_*_with_hz()
See PROGRESS.md for the full guide with examples.
πvctrs
Access to the vctrs R packageβs maturing C API, plus the #[derive(Vctrs)] proc macro
for defining custom vctrs-compatible classes.
C API wrappers:
init_vctrs()β load function pointers viaR_GetCCallableobj_is_vector()β check if object is a vctrs vectorshort_vec_size()β get vector sizeshort_vec_recycle()β recycle to target size
Derive macro:
#[derive(Vctrs)]withVctr,Rcrd,ListOfkinds#[miniextendr(vctrs)]impl blocks for methodscoerce = "type"attribute forvec_ptype2/vec_castgeneration
Requires the vctrs R package to be installed. See VCTRS.md for the full guide.
πSerialization Features
πserde
Direct Rust-R serialization with no JSON intermediate. Converts Rust structs to/from
native R objects (named lists, atomic vectors, etc.) using serdeβs Serialize and
Deserialize traits.
Provides:
RSerializeNative/RDeserializeNativetraitsAsSerialize<T>wrapper for returningSerializetypes from#[miniextendr]functions
Type mappings: structs become named lists, Vec<primitive> becomes atomic vectors,
Option::None becomes NA or NULL. See SERDE_R.md for details.
πserde_json
JSON string serialization via serde_json. Implies serde.
Provides:
RSerialize/RDeserializetraits (JSON-based)JsonOptions,NaHandling,FactorHandling,SpecialFloatHandlingconfigurationjson_from_sexp(),json_into_sexp()and variants (strict, permissive, custom)JsonValue/RJsonValueOpsfor working with JSON values
πtoml
TOML value conversions between R lists/strings and TOML.
Provides:
TomlValue/RTomlOpstype and adapter traittoml_from_str(),toml_to_string(),toml_to_string_pretty()helpers
πMatrix / Array Features
πndarray
N-dimensional array conversions between R vectors/matrices and the ndarray crate.
Supported types:
- Owned:
Array0throughArray6,ArrayD(dynamic dimensions) - Views:
ArrayView0..ArrayView6,ArrayViewD - Mutable views:
ArrayViewMut0..ArrayViewMut6,ArrayViewMutD - Shared:
ArcArray1,ArcArray2
Adapter traits: RNdArrayOps, RNdIndex, RNdSlice, RNdSlice2D
πnalgebra
Linear algebra type conversions between R vectors/matrices and nalgebra.
Supported types:
- Dynamic:
DVector,DMatrix - Static:
SVector<T, N>,SMatrix<T, R, C>
Adapter traits: RVectorOps, RMatrixOps
πNumeric Type Features
πnum-bigint
Arbitrary-precision integers via character string representation.
| Rust Type | R Type | Conversion |
|---|---|---|
BigInt | character(1) | String parsing (signed) |
BigUint | character(1) | String parsing (unsigned) |
Adapter traits: RBigIntOps, RBigIntBitOps, RBigUintOps, RBigUintBitOps
πExample
use num_bigint::BigInt;
#[miniextendr]
fn factorial_big(n: i32) -> BigInt {
(1..=n).fold(BigInt::from(1), |acc, x| acc * BigInt::from(x))
}
#[miniextendr]
fn bigint_add(a: BigInt, b: BigInt) -> BigInt {
a + b
}
In R:
factorial_big(50)
#> [1] "30414093201713378043612608166979581188299763898377..."
bigint_add("12345678901234567890", "98765432109876543210")
#> [1] "111111111011111111100"πrust_decimal
Fixed-point decimal numbers via character string representation.
| Rust Type | R Type | Conversion |
|---|---|---|
Decimal | character(1) | String parsing |
Adapter trait: RDecimalOps
πExample
use rust_decimal::Decimal;
use std::str::FromStr;
/// Lossless addition -- pass values as strings to avoid f64 rounding.
#[miniextendr]
fn decimal_add(a: Decimal, b: Decimal) -> Decimal {
a + b
}
#[miniextendr]
fn decimal_round(value: Decimal, dp: i32) -> Decimal {
value.round_dp(dp.max(0) as u32)
}
In R:
decimal_add("0.1", "0.2")
#> [1] "0.3"
decimal_round("3.14159", 2L)
#> [1] "3.14"πordered-float
NaN-orderable floating-point wrapper.
| Rust Type | R Type | Notes |
|---|---|---|
OrderedFloat<f64> | numeric | Panics on NaN |
Adapter trait: ROrderedFloatOps
πExample
use ordered_float::OrderedFloat;
/// Sort floats with total ordering (NaN sorts last).
#[miniextendr]
fn sort_floats(x: Vec<OrderedFloat<f64>>) -> Vec<OrderedFloat<f64>> {
let mut v = x;
v.sort();
v
}
/// Find the minimum value (NaN-safe).
#[miniextendr]
fn safe_min(x: Vec<OrderedFloat<f64>>) -> OrderedFloat<f64> {
x.into_iter().min().unwrap_or(OrderedFloat(f64::NAN))
}
In R:
sort_floats(c(3.1, 1.4, 2.7))
#> [1] 1.4 2.7 3.1
safe_min(c(5.0, 2.0, 8.0))
#> [1] 2πnum-complex
Complex number support using Rβs native CPLXSXP.
| Rust Type | R Type | Notes |
|---|---|---|
Complex<f64> | complex | Native R complex type |
Adapter trait: RComplexOps
πExample
use num_complex::Complex;
#[miniextendr]
fn complex_magnitude(z: Complex<f64>) -> f64 {
z.norm()
}
#[miniextendr]
fn complex_multiply(a: Complex<f64>, b: Complex<f64>) -> Complex<f64> {
a * b
}
In R:
complex_magnitude(3+4i)
#> [1] 5
complex_multiply(1+2i, 3+4i)
#> [1] -5+10i
πAdapter Trait Features
πnum-traits
Generic numeric operations via blanket implementations over num_traits traits.
Provides:
RNumβ basic numeric operations (add, sub, mul, div, rem, pow)RSignedβ signed number operations (abs, signum)RFloatβ floating-point operations (floor, ceil, round, sqrt, etc.)
πExample
use miniextendr_api::num_traits_impl::RFloat;
/// Clamp a value to [0, 1] and return its square root.
#[miniextendr]
fn safe_sqrt(x: f64) -> f64 {
let clamped = if x < 0.0 { 0.0 } else { x };
RFloat::sqrt(&clamped)
}
/// Check if a number is a normal finite value (not zero, subnormal, inf, or NaN).
#[miniextendr]
fn is_normal(x: f64) -> bool {
RFloat::is_normal(&x)
}
In R:
safe_sqrt(2.0)
#> [1] 1.414214
is_normal(0.0)
#> [1] FALSEπbytes
Byte buffer operations via the bytes crate.
Provides:
RBufβ read-only buffer adapter (wrapsBytes)RBufMutβ mutable buffer adapter (wrapsBytesMut)- Re-exports:
Buf,BufMut,Bytes,BytesMut
πExample
use bytes::Bytes;
/// Accept a raw vector and return its length.
#[miniextendr]
fn byte_length(data: Bytes) -> i32 {
data.len() as i32
}
/// Concatenate two raw vectors.
#[miniextendr]
fn concat_bytes(a: Vec<u8>, b: Vec<u8>) -> Bytes {
let mut combined = a;
combined.extend_from_slice(&b);
Bytes::from(combined)
}
In R:
byte_length(charToRaw("hello"))
#> [1] 5
concat_bytes(as.raw(1:3), as.raw(4:6))
#> [1] 01 02 03 04 05 06
πString / Text Features
πuuid
UUID conversions between R character vectors and the uuid crate. Enables UUID v4
generation.
| Rust Type | R Type | Notes |
|---|---|---|
Uuid | character(1) | Standard UUID format |
Vec<Uuid> | character | Vector of UUIDs |
Adapter trait: RUuidOps
Helpers: uuid_helpers module
πExample
use uuid::Uuid;
#[miniextendr]
fn generate_id() -> Uuid {
Uuid::new_v4()
}
#[miniextendr]
fn batch_ids(n: i32) -> Vec<Uuid> {
(0..n).map(|_| Uuid::new_v4()).collect()
}
#[miniextendr]
fn parse_uuid(s: String) -> Option<Uuid> {
Uuid::parse_str(&s).ok()
}
In R:
generate_id()
#> [1] "550e8400-e29b-41d4-a716-446655440000"
batch_ids(3)
#> [1] "a1b2c3d4-..." "e5f6a7b8-..." "c9d0e1f2-..."
parse_uuid("not-a-uuid")
#> [1] NAπregex
Compiled regular expressions from R character patterns.
| Rust Type | R Type | Notes |
|---|---|---|
Regex | character(1) | Compiled on conversion |
Adapter traits: RRegexOps, RCaptureGroups
Types: CaptureGroups
πExample
use regex::Regex;
/// Pattern is compiled automatically from an R string.
#[miniextendr]
fn extract_numbers(pattern: Regex, text: String) -> Vec<String> {
pattern.find_iter(&text).map(|m| m.as_str().to_string()).collect()
}
/// Split text on whitespace runs.
#[miniextendr]
fn split_whitespace(text: String) -> Vec<String> {
let re = Regex::new(r"\s+").unwrap();
re.split(&text).map(|s| s.to_string()).collect()
}
In R:
extract_numbers("\\d+", "abc123def456")
#> [1] "123" "456"
split_whitespace("hello world test")
#> [1] "hello" "world" "test"
Note: Regex does not implement IntoR β it is input-only. If you need to
reuse a compiled regex across calls, wrap it in an ExternalPtr<Regex>.
πurl
Validated URL parsing via the url crate.
| Rust Type | R Type | Notes |
|---|---|---|
Url | character(1) | Validated on conversion |
Vec<Url> | character | Vector of validated URLs |
Adapter trait: RUrlOps
Helpers: url_helpers module
πExample
use url::Url;
/// Extract the host from a URL, validating the input.
#[miniextendr]
fn get_host(url: Url) -> Option<String> {
url.host_str().map(|s| s.to_string())
}
/// Filter a vector of URLs to only HTTPS.
#[miniextendr]
fn keep_https(urls: Vec<Url>) -> Vec<Url> {
urls.into_iter().filter(|u| u.scheme() == "https").collect()
}
/// Join a relative path onto a base URL.
#[miniextendr]
fn join_path(base: Url, path: String) -> Result<Url, String> {
base.join(&path).map_err(|e| e.to_string())
}
In R:
get_host("https://example.com:8080/path")
#> [1] "example.com"
keep_https(c("https://a.com", "http://b.com", "https://c.com"))
#> [1] "https://a.com/" "https://c.com/"
join_path("https://example.com/api/", "v2/users")
#> [1] "https://example.com/api/v2/users"πaho-corasick
Fast multi-pattern string search via the Aho-Corasick algorithm.
Provides:
AhoCorasicktypeaho_compile()β build automaton from patternsaho_is_match(),aho_find_first(),aho_find_all(),aho_find_all_flat()aho_count_matches(),aho_replace_all()
Adapter trait: RAhoCorasickOps
πExample
use miniextendr_api::aho_corasick_impl::{aho_compile, aho_is_match, aho_replace_all};
#[miniextendr]
fn contains_any(patterns: Vec<String>, text: String) -> bool {
let ac = aho_compile(&patterns).unwrap();
aho_is_match(&ac, &text)
}
#[miniextendr]
fn censor_words(words: Vec<String>, text: String) -> String {
let ac = aho_compile(&words).unwrap();
aho_replace_all(&ac, &text, "***")
}
In R:
contains_any(c("foo", "bar"), "hello foobar")
#> [1] TRUE
censor_words(c("bad", "ugly"), "the bad and the ugly")
#> [1] "the *** and the ***"
πDate / Time Features
πtime
Date and time conversions via the time crate. Enables formatting, parsing, and
macro features.
| Rust Type | R Type | Notes |
|---|---|---|
OffsetDateTime | POSIXct | Timezone-aware datetime |
Date | Date | Calendar date |
Duration | difftime | Time duration |
Types: RDateTimeFormat, RDuration
πRandom Number Generation Features
πrand
Wraps Rβs built-in RNG with the rand crateβs RngCore trait, allowing use of
any rand-compatible distribution with Rβs RNG state.
Provides:
RRngβ Rβs RNG implementingrand::RngCoreRDistributionsβ direct access to Rβs native distributions (Normal, Uniform, etc.)
Adapter traits: RRngOps, RDistributionOps
πrand_distr
Re-exports the rand_distr crate for additional probability distributions
(Normal, Exponential, Gamma, etc.) that work with RRng. Implies rand.
πCollection Features
πindexmap
Order-preserving hash map conversions.
| Rust Type | R Type | Notes |
|---|---|---|
IndexMap<String, T> | named list | Preserves insertion order |
Adapter trait: RIndexMapOps
πtinyvec
Small-vector optimization types that avoid heap allocation for small collections.
| Rust Type | R Type | Notes |
|---|---|---|
TinyVec<[T; N]> | vector | Inline up to N, then spills to heap |
ArrayVec<[T; N]> | vector | Fixed capacity N, never allocates |
πEither / Sum Type Features
πeither
The Either<L, R> sum type from the either crate, with TryFromSexp and IntoR conversions.
| Rust Type | R Type | Notes |
|---|---|---|
Either<L, R> | depends on variant | Left/Right converted via their own IntoR/TryFromSexp |
πBinary Serialization Features
πborsh
Binary Object Representation Serializer for Hashing (Borsh). Provides a Borsh<T> wrapper
for converting between Borsh-serialized binary data and R raw vectors.
| Rust Type | R Type | Notes |
|---|---|---|
Borsh<T> | raw | Binary serialization via borsh derive |
πBit Manipulation Features
πbitflags
Integer-bitflag conversions via the bitflags crate.
Provides:
RFlags<T>β wrapper forFlagstypes with integer conversion- Re-exports
Flagstrait
πbitvec
Bit vector to logical vector conversions.
| Rust Type | R Type | Notes |
|---|---|---|
RBitVec | logical | Backed by BitVec |
Types: BitVec, Lsb0, Msb0
πBinary Data Features
πraw_conversions
POD (Plain Old Data) type conversions via the bytemuck crate. Provides zero-copy
(when aligned) conversions between Rust structs and R raw vectors.
Types:
Raw<T>β single POD value (headerless)RawSlice<T>β sequence of POD values (headerless)RawTagged<T>/RawSliceTagged<T>β with header metadata
Helpers: raw_from_bytes(), raw_to_bytes(), raw_slice_from_bytes(), raw_slice_to_bytes()
Re-exports: Pod, Zeroable derive macros from bytemuck
Note: Not portable across architectures (native byte order, no endian conversion).
πsha2
Cryptographic hashing helpers.
Provides:
sha256_str(data) -> Stringβ SHA-256 as hex stringsha256_bytes(data) -> Vec<u8>β SHA-256 as bytessha512_str(data) -> Stringβ SHA-512 as hex stringsha512_bytes(data) -> Vec<u8>β SHA-512 as bytes
πExample
use miniextendr_api::sha2_impl::{sha256_str, sha256_bytes};
#[miniextendr]
fn hash_string(s: String) -> String {
sha256_str(&s)
}
#[miniextendr]
fn hash_raw(data: Vec<u8>) -> String {
sha256_bytes(&data)
}
In R:
hash_string("hello world")
#> [1] "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
hash_raw(charToRaw("hello world"))
#> [1] "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
πFormatting Features
πtabled
Table formatting for producing ASCII/Unicode tables from data.
Provides:
table_to_string(),table_to_string_styled(),table_to_string_opts()table_from_vecs(),builder_to_string()- Re-exports:
Table,Tabled,Builder
πExample
use tabled::Tabled;
use miniextendr_api::tabled_impl::table_to_string_styled;
#[derive(Tabled)]
struct Record { name: String, score: i32 }
#[miniextendr]
fn format_scores(names: Vec<String>, scores: Vec<i32>) -> String {
let rows: Vec<Record> = names.into_iter().zip(scores)
.map(|(name, score)| Record { name, score })
.collect();
table_to_string_styled(&rows, "markdown")
}
In R:
cat(format_scores(c("Alice", "Bob"), c(95, 87)))
#> | name | score |
#> |-------|-------|
#> | Alice | 95 |
#> | Bob | 87 |
πDiagnostic Features
πmaterialization-tracking
Logs every ALTREP Dataptr call, which is when R forces a lazy/compact vector to
materialize into contiguous memory. Useful for diagnosing unexpected materializations
that negate ALTREP performance benefits.
Zero-cost when disabled (no runtime overhead).
From R:
miniextendr:::altrep_materialization_count()πmacro-coverage
Enables the macro_coverage module used for cargo expand auditing. This is a
development/testing feature for verifying macro expansion coverage across all
supported attribute combinations.
πProject-Wide Default Features
These features set project-wide defaults for #[miniextendr] options, so you donβt
need to annotate every function. Individual items can opt out with no_ prefixed keywords.
See FEATURE_DEFAULTS.md for the full guide with examples.
| Feature | Effect | Opt-out |
|---|---|---|
default-strict | Strict checked conversions for lossy types | no_strict |
default-coerce | Auto-coerce parameters | no_coerce |
default-r6 | R6 class system for impl blocks | env, s7, etc. |
default-s7 | S7 class system for impl blocks | env, r6, etc. |
default-worker | Force worker thread execution (implies worker-thread) | no_worker |
Note: error_in_r and main thread execution are now hardcoded defaults (no feature
needed). Opt out per-function with no_error_in_r or worker respectively.
Mutual exclusivity: default-r6/default-s7 cannot be enabled simultaneously.
πUsage
Enable features in your Cargo.toml:
[dependencies]
miniextendr-api = { version = "0.1", features = ["rayon", "serde", "ndarray"] }
To disable default features:
[dependencies]
miniextendr-api = { version = "0.1", default-features = false, features = ["rayon"] }πPrelude and crate re-exports
The prelude (use miniextendr_api::prelude::*) re-exports both the miniextendr
adapter types and the upstream dependency crates for every enabled feature.
You do not need to add optional crates as direct dependencies:
[dependencies]
# This is enough β no need for uuid = "1" or ndarray = "0.17"
miniextendr-api = { version = "0.1", features = ["uuid", "ndarray"] }use miniextendr_api::prelude::*;
// Uuid type is available directly
let id = Uuid::new_v4();
// Full upstream crate is also accessible for advanced usage
let parsed = uuid::Uuid::parse_str("550e8400-e29b-41d4-a716-446655440000").unwrap();
Feature implications (automatically enabled):
| Feature | Also enables |
|---|---|
serde_json | serde |
rand_distr | rand |
indicatif | nonapi |
πKnown Limitations
connectionsis experimental. R reserves the right to change the connection ABI without backward compatibility. Always checkR_CONNECTIONS_VERSION. See GAPS.md.- Feature-gated modules require path-based module switching with
#[cfg]onmoddeclarations. See GAPS.md. - vctrs cross-package export and inheritance are not yet implemented. See GAPS.md section 4.2.
See GAPS.md for the full catalog of known limitations.
πSee Also
- TYPE_CONVERSIONS.md β How feature-gated types convert to/from R
- FEATURE_DEFAULTS.md β Project-wide defaults via Cargo features
- THREADS.md β Thread utilities enabled by the
nonapifeature