Skip to main content

Module optionals

Module optionals 

Source
Expand description

Optional feature integrations with third-party crates.

This module contains all feature-gated integrations with external crates. Each submodule is only compiled when its corresponding feature is enabled. See the module documentation for a complete list of available features. Optional feature integrations with third-party crates.

This module contains all feature-gated integrations with external crates. Each submodule is only compiled when its corresponding feature is enabled.

§Available Features

FeatureModuleDescription
rayonrayon_bridgeParallel computation with R interop
randrand_implR’s RNG wrapped for rand crate
rand_distr-Re-exports rand_distr distributions
eithereither_implEither<L, R> conversions
ndarrayndarray_implN-dimensional array conversions
nalgebranalgebra_implLinear algebra type conversions
num-bigintnum_bigint_implBig integer support
rust_decimalrust_decimal_implDecimal number support
ordered-floatordered_float_implOrdered floats for sorting
uuiduuid_implUUID conversions
regexregex_implCompiled regex from R strings
indexmapindexmap_implOrder-preserving maps
timetime_implDate/time conversions
jiffjiff_implDate/time conversions with IANA tz (parallel to time)
serdeserde_implJSON serialization
num-traitsnum_traits_implGeneric numeric operations
bytesbytes_implByte buffer operations
num-complexnum_complex_implComplex number support
urlurl_implURL parsing and validation
sha2sha2_implCryptographic hashing
blake3blake3_implBLAKE3 hashing
md5md5_implMD5 hashing (interop only — broken crypto)
globsetglobset_implShell-style glob matching
zstdzstd_implzstd compression
bitflagsbitflags_implBitflag conversions
bitvecbitvec_implBit vector conversions
aho-corasickaho_corasick_implMulti-pattern string search
tomltoml_implTOML parsing
tabledtabled_implTable formatting
tinyvectinyvec_implSmall-vector optimized types
borshborsh_implBinary serialization

§Module template

Every integration module follows the same regional layout. Use this as a template when adding a new optional integration:

// region: Scalar conversions          (TryFromSexp + IntoR for T)
// region: Option conversions          (NA support — Option<T>)
// region: Vector conversions          (Vec<T>, Box<[T]>, slice views)
// region: Vec<Option<T>> conversions  (NA-aware vectors)
// region: R<X>Ops adapter trait       (e.g., RUuidOps, RUrlOps —
//                                      convenience methods callable
//                                      from #[miniextendr] code)
// region: Helper functions
// region: Unit tests

Exceptions: rayon_bridge.rs exposes a parallel-iteration API, not a type-conversion adapter, and does not follow this shape. serde_impl.rs is the JSON adapter (the native serde path lives in crate::serde). Array-heavy upstreams (ndarray_impl, arrow_impl, nalgebra_impl, jiff_impl) are larger because their type matrices are larger; the per-region shape still applies.