rd_rds/lib.rs
1//! Read-only reader for the subset of R's RDS serialization format used by
2//! installed-package help databases.
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//! This crate is scoped to installed-R-package information. Unknown SEXP
9//! values are hard errors, never silently accepted. `RObject`/`RValue` are a
10//! supported advanced API with encapsulated fields and non-exhaustive enums;
11//! consumers must include wildcard match arms. The typed [`package`] views are
12//! the stable convenience surface. `parse` accepts only decompressed XDR,
13//! while [`file::from_bytes`] accepts raw XDR, gzip, xz, bzip2, and zstd
14//! envelopes when enabled. Default resource limits are depth 5,000, vectors
15//! 8,000,000 elements, 16,000,000 total elements, and 256 MiB file inputs.
16
17mod cursor;
18mod decode;
19mod error;
20pub mod file;
21mod header;
22pub mod package;
23mod value;
24
25pub use cursor::ByteCursor;
26pub use decode::{parse, parse_with_limits};
27pub use error::Error;
28pub use header::{Header, RVersion};
29pub use value::{
30 Attribute, Attributes, EnvHandle, Limits, Persisted, REncoding, RObject, RStr, RValue,
31 SexpKind, Symbol,
32};