tpt-doc

Rust

Pure-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

Crates.io Docs.rs CI License: MIT OR Apache-2.0

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

CrateDescriptionDocs
tpt-doc-coreShared traits, zero-copy buffers, unified errorsdocs.rs
tpt-doc-spreadsheetStreaming .xlsx (OOXML) and .csv parsing/generationdocs.rs
tpt-doc-fhirHL7 FHIR R5 typed parsing, validation, and serializationdocs.rs
tpt-doc-ediEDIFACT and X12 parsing with schema validationdocs.rs
tpt-doc-pdfPure-Rust PDF 1.7/2.0 generation and parsingdocs.rs
tpt-doc-signCryptographic document signing (PAdES, XAdES, CAdES)docs.rs
tpt-doc-layoutHeadless HTML/CSS-to-PDF layout enginedocs.rs

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