rd_rds/lib.rs
1//! Read-only reader for installed-package metadata, help databases, and
2//! selected CRAN-like repository indexes in R's RDS serialization format.
3//!
4//! [`parse`] reads a decompressed XDR serialization stream. [`mod@file`] provides
5//! the bounded standalone-file entry layer, including supported compression
6//! envelopes.
7//!
8//! See the crate README for the concrete repository-index profiles covered by
9//! deterministic fixtures and verified manually against real files.
10//!
11//! This crate is scoped to installed-R-package information and selected
12//! CRAN-like repository indexes. Unknown SEXP
13//! values are hard errors, never silently accepted. `RObject`/`RValue` are a
14//! supported advanced API with encapsulated fields and non-exhaustive enums;
15//! consumers must include wildcard match arms. The typed [`package`] views and
16//! general [`matrix::CharacterMatrix`] view are the stable convenience surface.
17//! `parse` accepts only decompressed XDR,
18//! while [`file::from_bytes`] accepts raw XDR, gzip, xz, bzip2, and zstd
19//! envelopes when enabled. Default resource limits are depth 5,000, vectors
20//! 8,000,000 elements, 16,000,000 total elements, and 256 MiB file inputs.
21
22mod cursor;
23mod decode;
24mod error;
25pub mod file;
26mod header;
27pub mod matrix;
28pub mod package;
29mod value;
30
31pub use cursor::ByteCursor;
32pub use decode::{parse, parse_with_limits};
33pub use error::Error;
34pub use header::{Header, RVersion};
35pub use value::{
36 Attribute, Attributes, EnvHandle, Limits, Persisted, REncoding, RObject, RStr, RValue,
37 SexpKind, Symbol,
38};