openbim-ifcx-binding-core
Host-independent core shared by the openbim-ifcx language bindings (WebAssembly, Python).
| Crate | openbim-ifcx-binding-core 0.1.0 on main |
|---|---|
| Latest release | not released |
| Distributed as | not published on its own (publish = false); ships inside the bindings |
| Requires | Rust 1.88.0 |
| License | MIT |
| API documentation | rustdoc |
| Source | crates/openbim-ifcx-binding-core/ |
About
From the crate's README.md:
The host-independent core shared by the openbim-ifcx language bindings: the operations, the JSON shapes handed to the hosts, and the stable error codes, written once and wrapped by the WebAssembly (@openbim/ifcx on npm) and Python (openbim-ifcx on PyPI) bindings. It adds no IFCX behaviour of its own.
This crate is internal to the bindings and ships only inside them (publish = false); Rust applications use openbim-ifcx directly.
Document: one file, read and written back losslessly, validated against its own schemas.LayerSet: layers weakest first and, optionally, the files their imports name (resolved throughMemoryResolverunder a synthetic main layer, as upstream'sifcx composedoes); composed into a{path, attributes, children}tree, validated as one federated file, or exported as GLB throughopenbim-ifcx-geometry.BindingError:read,write,layer,compose,invalid-argument,glb. A code may be added, never renamed or reused; a unit test pins the set.
Results cross to the hosts as JSON text, which they parse into plain objects (JSON.parse, json.loads). Tests of the behaviour live here and run with cargo test; the hosts' suites cover only their conversions.
Licensed under MIT.
Public API
The crate root, as rustdoc shows it. Follow a name to its rustdoc entry.
| Item | Kind | Summary |
|---|---|---|
BindingError | enum | Why a binding call failed. |
Document | struct | One IFCX file held by a host. |
GlbSettings | struct | How LayerSet::to_glb places the model; see openbim_ifcx_geometry::glb::GlbOptions. |
LayerSet | struct | The layers of one model and, optionally, the files they import. |
Within the workspace
- Depends on
openbim-ifcx,openbim-ifcx-geometry - Used by
openbim-ifcx-py,openbim-ifcx-wasm
Changes
Unreleased, on main:
Not released on its own (publish = false): it ships inside the npm and PyPI packages, whose changelogs name the releases.
Changed
LayerSetwith imports stacks its layers withLayerStackBuilder::build_allinstead of building its own synthetic main layer; the order and the reports are unchanged. Federation and composition move the parsed layers instead of copying them (federate_owned,LayerStack::into_federated,flatten_owned) (#42, #43).- Breaking:
LayerSetwith imports puts every layer after the layers it imports, so a layer overrides its imports (buildingSMART/IFC5-development#144; was: an import overrode its importer). The federated header is the strongest layer's, the last one, with or without imports (was the first layer's). Composition and validation results without imports are unchanged (#36).
Added
- The host-independent half of the language bindings:
Document(read, lossless write, header, validation against the file's own schemas),LayerSet(layers weakest first, optional in-memory imports under a synthetic main layer, composition into a{path, attributes, children}tree, federated validation, GLB export throughopenbim-ifcx-geometry), validation reports with stable failurekindcodes, andBindingErrorwith the stable codesread,write,layer,compose,invalid-argumentandglb.
Full history: crates/openbim-ifcx-binding-core/CHANGELOG.md, and every release of every crate on the project changelog.