Skip to content

openbim-ifcx-binding-core ​

Host-independent core shared by the openbim-ifcx language bindings (WebAssembly, Python).

Crateopenbim-ifcx-binding-core 0.1.0 on main
Latest releasenot released
Distributed asnot published on its own (publish = false); ships inside the bindings
RequiresRust 1.88.0
LicenseMIT
API documentationrustdoc
Sourcecrates/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 through MemoryResolver under a synthetic main layer, as upstream's ifcx compose does); composed into a {path, attributes, children} tree, validated as one federated file, or exported as GLB through openbim-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.

ItemKindSummary
BindingErrorenumWhy a binding call failed.
DocumentstructOne IFCX file held by a host.
GlbSettingsstructHow LayerSet::to_glb places the model; see openbim_ifcx_geometry::glb::GlbOptions.
LayerSetstructThe layers of one model and, optionally, the files they import.

Within the workspace ​

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 ​

  • LayerSet with imports stacks its layers with LayerStackBuilder::build_all instead 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: LayerSet with 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 through openbim-ifcx-geometry), validation reports with stable failure kind codes, and BindingError with the stable codes read, write, layer, compose, invalid-argument and glb.

Full history: crates/openbim-ifcx-binding-core/CHANGELOG.md, and every release of every crate on the project changelog.

Released under the MIT licence. No buildingSMART files or texts are published here.