Reference page
Feature Backlog
This document lists practical feature candidates for upcoming maintenance cycles. Items are scoped to be incremental and compatible with the current architecture.
This document lists practical feature candidates for upcoming maintenance cycles. Items are scoped to be incremental and compatible with the current architecture.
πCompleted
π1. Harden ALTREP registration diagnostics β
validate_altrep_class()checks for null handles afterR_make_alt*_class().- Wired into
make_class_by_base(), all 7impl_inferbase_*macros, and explicit-base codegen path.
π2. Structured panic telemetry hook β
panic_telemetrymodule withPanicSourceenum and optional hook viaAtomicPtr.fire()called at all 3 panicβR-error sites (worker, altrep_bridge, unwind_protect).- Zero overhead when no hook is set (single atomic load).
π3. Strict conversion mode (outputs, standalone fns) β
#[miniextendr(strict)]on standalone functions panics instead of silently widening i64/u64/isize/usize to f64.strictmodule withchecked_into_sexp_*helpers.- Codegen wired via
return_type_analysis.rsfor lossy scalar andVecreturn types.
π4. Strict conversion mode β impl methods β
#[miniextendr(r6, strict)](or any class system +strict) extends strict output conversion to impl block methods.strictfield added toImplAttrs,ParsedImpl,CWrapperContext, and builder.sexp_conversion_expr()helper onCWrapperContexthandles bare,Option<T>, andResult<T, E>return types β delegates tostrict_conversion_for_type().- All 6
IntoRreturn handling branches (3 main thread + 3 worker thread) updated.
π5. Strict conversion mode β inputs (TryCoerce) β
#[miniextendr(strict)]now also validates input parameters for lossy types (i64/u64/isize/usize + Vec variants).- Only INTSXP and REALSXP accepted; RAWSXP and LGLSXP rejected with βstrict conversion failed for parameter β{name}ββ error.
- REALSXP values go through
TryCoerceto catch fractional, NaN, and overflow. - Strict takes priority over
coercefor lossy types. - Wired through both standalone functions (
lib.rs) and impl methods (c_wrapper_builder.rs) viaRustConversionBuilder::with_strict().
π6. #[miniextendr(internal)] and #[miniextendr(noexport)] attributes β
internalinjects@keywords internaland suppresses@export.noexportsuppresses@exportonly (no@keywords internal).- Works on standalone functions and all 6 class system impl blocks
(env, R6, S3, S4, S7, vctrs) via
ClassDocBuilder::with_export_control().
π7. String ALTREP Dataptr β
- Bridge-layer materialization: Rust
Vec<String>/Box<[String]>materialize into native R STRSXP cached in the ALTREP data2 slot. - Enables
saveRDS/readRDSroundtrip andidentical()for string ALTREP vectors. - Uses
DATAPTR_ROwith cast (DATAPTR is behindnonapifeature gate).
π8. Adapter test coverage expansion β
- Added 3β5 edge-case functions per adapter for 13 thin adapter modules (sha2, aho-corasick, time, tinyvec, indexmap, ordered-float, toml, bytes, either, url, bitvec, bitflags, tabled).
- Corresponding R test expectations in
test-feature-adapters.R.
π9. Conversion behavior matrix β
docs/CONVERSION_MATRIX.md: R input type Γ Rust target type β behavior reference.- Covers INTSXP, REALSXP, LGLSXP, RAWSXP, STRSXP against i32, f64, u8, bool, String, i64/u64/isize/usize in normal, coerce, and strict modes.
π10. Sparse iterator ALTREP guide β
docs/SPARSE_ITERATOR_ALTREP.md: compute-on-access pattern,Iterator::nth()for efficient skipping, comparison with materialization, usage guidance.
π11. vctrs documentation expansion β
- Expanded
docs/VCTRS.mdwith record type example, list-of pattern, advanced coercion, and troubleshooting section.
π12. Fix has_roxygen_tag for multi-word tags β
has_roxygen_tag("keywords internal")was broken βtag_names()only extracts first word after@. Added multi-word branch matching full content after@.- Added comprehensive unit tests for
has_roxygen_tag,tag_names,find_tag_value.
π13. Vec<Option<T>> IntoR for extended numeric types β
- Smart i32/f64 conversion for
Vec<Option<i64/u64/isize/usize>>β checks if all non-None values fit i32 β INTSXP, otherwise REALSXP with NA_REAL for None. - Simple coercion for
Vec<Option<i8/i16/u16/u32/f32>>via widening macro. - Strict mode:
checked_vec_option_{i64,u64,isize,usize}_into_sexp()helpers. - Proc-macro detection:
strict_conversion_for_type()handlesVec<Option<lossy>>.
π14. S7 multi-level inheritance tests β
- 3-level chain:
S7Animal(abstract) βS7DogβS7GoldenRetriever. - R tests verify
S7::S7_inherits()through full chain, abstract rejection. - GAPS.md section 3.1 updated: inheritance chains marked as implemented.
π15. Rustdoc examples for feature-gated modules β
- Added
/// # Examplesblocks (ignore-marked) toprogress.rs,vctrs.rs,connection.rsfor key public items.
π16. Field access documentation β
- GAPS.md section 3.3 marked RESOLVED via
#[r_data]+RSidecarsidecar pattern. - CLASS_SYSTEMS.md: added βField Access via Sidecarβ subsection.
- GAPS.md section 2.3:
Vec<Option<T>>updated to βWorks (all scalar types)β.
π17. Fix String ALTREP NA serialization β
into_sexp_altrepSTRSXP branch now usesVec<Option<String>>instead ofVec<String>, preservingNA_character_throughsaveRDS/readRDSroundtrips.- Added
RegisterAltrep+InferBaseforVec<Option<String>>. - Test suite: 0 FAIL, 2868 PASS (previously 2 FAIL).
πActive: Next Up
πParked: Needs Evidence
These items are plausible but lack a demonstrated need or clear design.
- Pooled PROTECT scope β
Rf_protect()is already cheap (stack counter increment). No benchmark shows this is a bottleneck. Revisit if profiling reveals protect overhead in tight loops. - ALTREP region prefetch β R controls
get_regioninvocation, not the ALTREP class. Canβt prefetch from the implementor side as described. Reframe as docs/examples on efficientget_regionimplementation if needed. - Microbenchmark gating in CI β valuable but depends on CI infrastructure (not yet set up). Revisit when CI exists.
πDropped
- Wrapper diff mode β
git diffalready handles this. Wrappers are mechanical.Call()functions; a dedicated diff tool adds complexity for no real gain.