tpt-doc
RustPure-Rust enterprise document substrate — streaming OOXML/CSV, HL7 FHIR R5, EDIFACT/X12, PDF 1.7/2.0, PAdES/XAdES/CAdES signing, and HTML-to-PDF layout. No C-FFI. No Python. 100% MIT/Apache-2.0. NZISM · FHIR R5 · HIPC 2020 compliant.
0 stars0 forks0 watchers
Languages
Rust100.0%
README
tpt-doc
The Enterprise Document & Data Substrate — high-assurance, pure-Rust, spec-compliant document generation and parsing for civic and enterprise platforms.
No shelling out to Python or Java. No C-FFI. No bloated dependency trees. 100% MIT/Apache-2.0 compatible.
Crates
| Crate | Description | Docs |
|---|---|---|
tpt-doc-core | Shared traits, zero-copy buffers, unified errors | |
tpt-doc-spreadsheet | Streaming .xlsx (OOXML) and .csv parsing/generation | |
tpt-doc-fhir | HL7 FHIR R5 typed parsing, validation, and serialization | |
tpt-doc-edi | EDIFACT and X12 parsing with schema validation | |
tpt-doc-pdf | Pure-Rust PDF 1.7/2.0 generation and parsing | |
tpt-doc-sign | Cryptographic document signing (PAdES, XAdES, CAdES) | |
tpt-doc-layout | Headless HTML/CSS-to-PDF layout engine |
Quick Start
[dependencies]
tpt-doc-fhir = "0.1"
tpt-doc-sign = "0.1"
use tpt_doc_fhir::prelude::*;
use tpt_doc_sign::prelude::*;
// Build a strictly typed FHIR Patient resource
let patient = Patient::builder()
.id("nz-12345".into())
.name(HumanName::new("Smith", "John"))
.build()?;
// Serialize to compliant JSON
let json_bytes = patient.to_json()?;
// Sign for HIPC 2020 compliance
let signature = tpt_doc_sign::pades::sign(&json_bytes, &private_key)?;
Compliance Targets
- NZISM — New Zealand Information Security Manual
- HL7 FHIR R5 — Fast Healthcare Interoperability Resources
- HIPC 2020 — Health Information Privacy Code
Development Roadmap
- Phase 1 (Months 1–2):
tpt-doc-core+tpt-doc-spreadsheet - Phase 2 (Months 3–4):
tpt-doc-fhir+tpt-doc-edi - Phase 3 (Months 5–6):
tpt-doc-pdf+tpt-doc-sign+tpt-doc-layout
License
Licensed under either of:
at your option.
Copyright (c) 2026 TPT Solutions