XDRS (XDR Serialization)
This package provides:
-
Traits
ReadXDRandWriteXDR, for converting between Rust values and the XDR data model -
Derive-macros
ReadXDR,WriteXDR,XDR, andConstWriteXDR(see cratexdr_derive) -
Traits
serialize::Readerandserialize::Writer, for converting between the XDR data model and some serialization format -
Implementations of
serialize::{Reader, Writer}:- CXS (see module
cxs) - TXS ("Traditional XDR Serialization") (see module
txs)
- CXS (see module
The library is no_std. Optional features:
detailed-errors(enabled by default): retain preciseReadErrorvariants and diagnostic payloads. Contract builds can usedefault-features = falseto replace them with a single compact error value while preserving identical validation behavioralloc: allocation-based interfaces (Vec,String, growableBufWriters, ownedencode()functions)permissive: accept non-minimal CXS integer encodings and non-zero TXS padding when decodingint128:i128/u128supportderive: derive macrosReadXDR,WriteXDR,XDR, andConstWriteXDR(cratexdr_derive)repr: datatypes representing XDR specifications (cratexdr_repr; impliesalloc)ns: C++-like namespaces for XDR specs inxdr_repr(impliesrepr)heapless: serialization support forheaplesstypes, plus schema support when combined withreprserde/schemars: serde and JSON-schema support forxdr_commontypes
See the crate docs (cargo doc --open) for details on each feature and
the full API.
ONC-RPC (rpc/)
thruput-rpc-api (the stable API boundary for generated bindings) and
thruput-rpc-driver (transports, pools, server) live in
rpc/.
On crates.io every crate here is published with a thruput- prefix:
thruput-xdrs, thruput-xdr-common, thruput-xdr-derive, thruput-xdr-repr,
thruput-rpc-api and thruput-rpc-driver. The xdr crates keep their
library names (xdrs::); the rpc crates are imported by package name
(thruput_rpc_api::, thruput_rpc_driver::).
TODOs
- Optional recursion depth limit for decoding recursive datastructures (see
the
read_xdrmodule docs for bounding stack usage today).