xportrs
Pure Rust SAS XPORT (XPT) library for CDISC clinical trial data submissions
A safe, DataFrame-agnostic implementation of SAS Transport v5 (XPT) file I/O with built-in regulatory compliance validation for FDA, PMDA, and NMPA submissions.
Features
- Regulatory Compliance — Built-in validation for FDA, PMDA, and NMPA submission requirements
- Read & Write — Full support for SAS Transport v5 format
- Auto File Splitting — Automatically splits files exceeding agency size limits (5 GB)
- Framework Agnostic — Works with any in-memory data representation
- Safe by Design — Zero unsafe code, no C dependencies
Regulatory Agency Support
| Agency | Region | Character Encoding | Max File Size |
|---|---|---|---|
| FDA | United States | ASCII | 5 GB |
| PMDA | Japan | UTF-8 (Japanese) | 5 GB |
| NMPA | China | UTF-8 (Chinese) | 5 GB |
All agencies enforce: 8-byte variable names, 40-byte labels, 200-byte character values.
Installation
[]
= "0.0.7"
Quick Example
use ;
For comprehensive examples and API documentation, see docs.rs/xportrs.
Documentation
- API Reference — Full API documentation
- Examples — Code examples for reading, writing, and validation
- CONTRIBUTING — Contribution guidelines
Safety & Quality
| Aspect | Status |
|---|---|
| Unsafe Code | #![forbid(unsafe_code)] |
| External C Dependencies | None |
| Minimum Rust Version | 1.92 |
Related Projects
- xportr — R package that inspired this crate
- Trial Submission Studio — Desktop application using xportrs
License
MIT License — see LICENSE for details.