openbim_ifcx_wasm/lib.rs
1//! WebAssembly bindings for `openbim-ifcx`.
2//!
3//! Reads, writes, validates and composes IFC5 / IFCX files from JavaScript.
4//! An `IfcxFile` holds one file and writes it back losslessly; `compose` and
5//! `validate` take a list of layers, weakest first, and return plain
6//! objects; `exportGlb` writes the composed model as binary glTF.
7//!
8//! Every operation lives in `openbim-ifcx-binding-core`, shared with the
9//! Python binding. This crate converts JS arguments and results only, and is
10//! empty outside `wasm32`.
11//!
12//! A test of anything that does not need a JS host belongs in
13//! `openbim-ifcx-binding-core`, where `cargo test` runs it natively; the Node
14//! suite here covers only the JS conversion itself.
15
16#![forbid(unsafe_code)]
17
18#[cfg(target_arch = "wasm32")]
19mod api;
20#[cfg(target_arch = "wasm32")]
21mod convert;
22#[cfg(target_arch = "wasm32")]
23mod error;
24
25#[cfg(target_arch = "wasm32")]
26pub use api::IfcxFile;