Pure-Rust infrastructure for ISO 21597 Information Container for linked Document Delivery (ICDD): ZIP containers that preserve payload documents while RDF describes the container and links elements across documents.
This repository is the only implementation home of ICDD in OpenBIM.rs. Downstream applications should consume this crate rather than own private ZIP, RDF/XML, or ICDD implementations.
0.1.x reserved the package names. 0.2.0 is the first functional release.
| Capability | Status |
|---|---|
| Conventional ICDD archive paths | Implemented |
| Lazy ZIP container reading, bounded payload reads, and streaming copies | Implemented |
| Safe payload extraction | Implemented; rejects traversal and symlink paths and bounds expansion |
| Deterministic ZIP construction | Implemented |
Typed Index.rdf decoding |
Implemented |
| Typed ISO 21597-1 linkset decoding | Implemented |
| Raw RDF/XML parsing and serialization | Implemented; unknown triples survive semantic round-trip |
| Generic payload, linkset, and ontology writing | Implemented |
| Opaque payload-byte preservation | Implemented |
| Structural conformance reporting | Implemented for the owned archive, index, and linkset contract |
The reader accepts documented compatibility casing where lookup remains unique,
but fails closed on ambiguous ZIP names, unsafe paths, malformed RDF, spoofed
ontology namespaces, and missing declared linksets. conformance_issues reports
non-fatal layout and indicator findings. These checks are not a complete
normative ISO 21597 conformance suite or certification claim.
The preservation boundary is explicit: opaque payload bytes remain exact and unknown RDF triples survive semantic parse/serialize round-trips. RDF/XML lexical layout and reconstructed ZIP-envelope bytes are intentionally not a byte-identical rewrite contract; deterministic output is the writer guarantee.
| Package | Purpose |
|---|---|
openbim-icdd |
Canonical implementation; owns every ICDD type and behavior |
icdd |
Pure re-export alias pinned to the exact canonical version |
Cargo has dependency renaming but no crates.io package aliases. icdd defines
nothing and re-exports openbim-icdd, so both names expose identical types.
Do not depend on both names directly.
cargo add openbim-icdd
# or: cargo add icdduse openbim_icdd::IcddContainer;
let mut container = IcddContainer::open_path("delivery.icdd")?;
for document in container.ifc_documents_including_requested() {
println!("{}", document.name.as_deref().unwrap_or(&document.id));
}
# Ok::<(), openbim_icdd::IcddError>(())Constructors accept RDF/XML produced by the maintained Oxigraph stack and write
the archive through the maintained zip crate:
use openbim_icdd::IcddArchiveBuilder;
let bytes = IcddArchiveBuilder::new(include_bytes!("Index.rdf"))?
.add_payload("model.ifc", std::fs::read("model.ifc")?)?
.finish()?;
# Ok::<(), Box<dyn std::error::Error>>(())ICDD uses maintained ecosystem libraries directly:
zipfor archive I/O and Deflate;oxrdfxmlfor RDF/XML parsing and serialization;oxrdffor RDF terms and triples.
There is deliberately no first-party XML or ZIP abstraction crate in this
dependency path. ICDD is the domain boundary; XML and ZIP are implementation
technologies. The retired openbim-codec-xml scaffold is not used.
docs/architecture.md— ownership, dependencies, and alias boundariesopenbimrs/openbim— integrated workspace and facade
Payload IFC, PDF, spreadsheet, drawing, or image bytes remain opaque. ICDD owns container and link metadata without importing every payload format.
No ISO, DIN, CEN, or other restricted standards artifact is tracked or packaged.
Locally available references belong under ignored references/. A fixture may
enter version control only when its redistribution terms are known and compatible.
Synthetic fixtures cover CI; local oracle tests may use restricted references
without publishing them.
Requires Rust 1.88 or newer and Python 3.10 or newer for the semantic alias
gate.
git clone https://github.com/openbimrs/icdd.git
cd icdd
./scripts/gate.shThe gate checks formatting, build, tests, Clippy, rustdoc, alias purity, and crates.io package verification using command exit codes.
See CONTRIBUTING.md. Capability work must add executable
evidence and update the status table without overstating coverage.
AGPL-3.0-or-later — see LICENSE.