Changelog
All notable changes to xportrs are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
- Comprehensive mdbook documentation with mermaid diagrams
- Full regulatory compliance documentation
- API reference documentation
- Usage guides and troubleshooting
[0.0.6] - 2026
Added
-
Format type with parsing: New
Formatstruct for SAS format handlingFormat::parse("DATE9.")- Parse format stringsFormat::numeric(8, 2)- Create numeric formatsFormat::character(200)- Create character formatsFormat::from_namestr()- Reconstruct from XPT fields
-
Column metadata support: Extended
Columnstruct.with_label("...")- Set variable label.with_format(Format)- Set display format.with_format_str("DATE9.")- Parse and set format.with_informat(Format)- Set input format.with_length(n)- Set explicit character length
-
Metadata preservation on read: XPT files now preserve:
- Variable labels from NAMESTR
nlabel - Display formats from NAMESTR
nform,nfl,nfd,nfj - Input formats from NAMESTR
niform,nifl,nifd - Explicit character lengths
- Variable labels from NAMESTR
-
Validation warnings: New validation issues
MissingVariableLabel- Warning when label is emptyMissingDatasetLabel- Warning when dataset label is emptyInvalidFormatSyntax- Error for malformed format strings
Changed
Dataset::with_label()now takesimpl Into<Label>instead ofOption<impl Into<Label>>- Added
Dataset::set_label()for conditional label setting - Format metadata now correctly written to NAMESTR records (previously hardcoded to 0)
Fixed
- Format fields
nfl,nfd,nfj,nifl,nifdnow contain actual values instead of zeros - Metadata roundtrip: labels and formats preserved through read → write cycle
[0.0.5] - 2026
Added
- CITATION.cff for academic citation
- codemeta.json for metadata
- JSON schema support
[0.0.4] - 2026
Added
- Initial public release
- XPT V5 reading and writing
- FDA/PMDA/NMPA agency validation
- Automatic file splitting at 5GB
- IBM floating-point encoding/decoding
- SAS epoch date handling
Features
Xpt::read()- Read XPT filesXpt::write()- Write XPT filesXpt::inspect()- Get file metadataDataset,Column,ColumnDatatypesAgencyenum for regulatory validationIssueandSeverityfor validation results
Migration Guide
From 0.0.5 to 0.0.6
Dataset::with_label signature change
#![allow(unused)]
fn main() {
// Before (0.0.5)
Dataset::with_label("AE", Some("Adverse Events"), columns)
// After (0.0.6)
Dataset::with_label("AE", "Adverse Events", columns)
// For conditional labels
let mut ds = Dataset::new("AE", columns)?;
if let Some(label) = maybe_label {
ds.set_label(label);
}
}
Adding metadata to columns
#![allow(unused)]
fn main() {
// New in 0.0.6
Column::new("VAR", data)
.with_label("Variable Label")
.with_format(Format::character(200))
.with_length(200)
}
Checking for warnings
#![allow(unused)]
fn main() {
// New warnings in 0.0.6
let validated = Xpt::writer(dataset).finalize()?;
for issue in validated.issues() {
match issue {
Issue::MissingVariableLabel { variable } => {
println!("Warning: {} missing label", variable);
}
Issue::MissingDatasetLabel { dataset } => {
println!("Warning: {} missing label", dataset);
}
_ => {}
}
}
}
Compatibility
| xportrs Version | Rust Version | MSRV |
|---|---|---|
| 0.0.6 | 1.70+ | 1.70 |
| 0.0.5 | 1.70+ | 1.70 |
| 0.0.4 | 1.70+ | 1.70 |
License
xportrs is dual-licensed under MIT and Apache 2.0.