Overview
IFClite parses, processes, and renders IFC files in the browser using Rust + WebAssembly and WebGPU. Smaller and faster than the alternatives. Supports both IFC4 (STEP) and IFC5 (IFCX/JSON).
Features
| Feature | Description |
|---|---|
| Clean DX | Columnar data structures, TypedArrays, consistent API. Built from scratch for clarity |
| STEP/IFC Parsing | Zero-copy tokenization with full IFC4X3 schema support (876 entities) |
| IFC5 (IFCX) Support | Native parsing of JSON-based IFC5 format with ECS composition and USD geometry |
| Streaming Pipeline | See geometry fast, not after a long wait: first render in ~202ms to ~5.43s, depending on model size |
| WebGPU Rendering | Modern GPU-accelerated 3D with depth testing and frustum culling |
| Zero-Copy GPU | Direct WASM memory to GPU buffers, 60-70% less RAM |
| Multi-Model Federation | Load multiple IFC files with unified selection, visibility, and ID management |
| Basket Isolation | Incremental isolation set with = set / + add / - remove, Cmd+Click multi-select |
| BCF Collaboration | BIM Collaboration Format support with topics, viewpoints, and comments |
| IDS Validation | Information Delivery Specification checking against IFC data |
| 2D Drawings | Section cuts, floor plans, and elevations with interactive annotations (measure, area, text, clouds) |
| Property Editing | Edit IFC properties in-place with bidirectional change tracking |
| IFC Export | Visible-only and merged multi-model export with full IFC4/IFC4X3 schema coverage |
Quick Start
Option 1: Create a New Project (Recommended)
Get started instantly without cloning the repo:
&&
Or create a React viewer:
&&
Option 2: Install Packages Directly
Add IFClite to your existing project:
import { IfcParser } from '@ifc-lite/parser';
const parser = new IfcParser();
const result = await parser.parse(ifcBuffer);
console.log(`Found ${result.entityCount} entities`);
For full 3D rendering, add geometry and renderer packages:
Option 3: Rust/Cargo
For Rust projects:
use parse_ifc;
let result = parse_ifc?;
println!;
Option 4: Clone the Repo (Contributors)
For contributing or running the full demo app:
Open http://localhost:5173 and load an IFC file.
Note: Requires Node.js 18+ and pnpm 8+. No Rust toolchain needed - WASM is pre-built.
Git LFS: Test IFC fixtures are stored with Git LFS. Run
git lfs install && git lfs pullafter cloning.Important: The
pnpm buildstep is required before runningpnpm devbecause the viewer depends on local packages that need to be compiled first.๐ Full Guide: See Installation for detailed setup options including troubleshooting.
Option 5: Desktop App (Tauri)
Run IFClite as a native desktop application with enhanced performance:
Build for specific platforms:
Note: Requires Rust toolchain for building. See Tauri Prerequisites.
Basic Usage
import { IfcParser } from '@ifc-lite/parser';
import { Renderer } from '@ifc-lite/renderer';
// Parse IFC file
const parser = new IfcParser();
const result = await parser.parse(ifcArrayBuffer);
// Access entities (Map<expressId, IfcEntity>)
const walls = [...result.entities.values()].filter(e => e.type === 'IFCWALL');
console.log(`Found ${walls.length} walls`);
// Render geometry (requires @ifc-lite/renderer + @ifc-lite/geometry)
const renderer = new Renderer(canvas);
await renderer.init();
renderer.loadGeometry(meshData); // MeshData[] from geometry processing
renderer.render();
Documentation
| Resource | Description |
|---|---|
| Quick Start | Parse your first IFC file in 5 minutes |
| Installation | Detailed setup for npm, Cargo, Docker, and from source |
| User Guide | Parsing, geometry, rendering, querying, BCF, IDS, 2D drawings |
| Federation | Multi-model loading with unified selection and visibility |
| Desktop App | Native Tauri app with multi-threading and filesystem access |
| Tutorials | Build a viewer, custom queries, extend the parser |
| Architecture | System design with detailed diagrams |
| API Reference | TypeScript (25 packages), Rust, and WASM API docs |
| Contributing | Development setup, testing, and release process |
Architecture
flowchart LR
IFC[IFC/IFCX Files] --> Tokenize
Tokenize --> Scan --> Decode
Decode --> Tables[Columnar Tables]
Decode --> Graph[Relationship Graph]
Tables --> Federation[Multi-Model Federation]
Federation --> Renderer[WebGPU Renderer]
Federation --> Drawing2D[2D Drawings]
Graph --> Export[glTF / Parquet / IFC]
BCF[BCF File] --> Viewer
IDS[IDS Rules] --> Validator[IDS Validator]
Validator --> Viewer
Renderer --> Viewer[Viewer App]
style IFC fill:#6366f1,stroke:#312e81,color:#fff
style Tokenize fill:#2563eb,stroke:#1e3a8a,color:#fff
style Scan fill:#2563eb,stroke:#1e3a8a,color:#fff
style Decode fill:#10b981,stroke:#064e3b,color:#fff
style Tables fill:#f59e0b,stroke:#7c2d12,color:#fff
style Graph fill:#f59e0b,stroke:#7c2d12,color:#fff
style Federation fill:#f59e0b,stroke:#7c2d12,color:#fff
style Renderer fill:#a855f7,stroke:#581c87,color:#fff
style Drawing2D fill:#a855f7,stroke:#581c87,color:#fff
style Export fill:#a855f7,stroke:#581c87,color:#fff
style BCF fill:#ec4899,stroke:#831843,color:#fff
style IDS fill:#ec4899,stroke:#831843,color:#fff
style Validator fill:#ec4899,stroke:#831843,color:#fff
style Viewer fill:#06b6d4,stroke:#164e63,color:#fff
IFC files flow through parsing, data storage, and rendering layers. Multiple models can be loaded simultaneously via federation. BCF and IDS provide collaboration and validation capabilities. See the Architecture Documentation for detailed diagrams.
Deep Dive: Data Flow ยท Parsing Pipeline ยท Geometry Pipeline ยท Rendering Pipeline ยท Federation
Server Paradigm
For production deployments, IFClite provides a Rust server that processes geometry and data model fully upfront, enabling instant loading for repeat visits. Unlike the client-side parser (which uses on-demand property extraction for responsiveness), the server computes everything in parallel and caches the complete result.
flowchart LR
subgraph Client
Upload[Upload IFC]
Viewer[WebGPU Viewer]
end
subgraph Server
Parse[Parse & Process]
Cache[(Content Cache)]
end
Upload -->|hash check| Cache
Cache -->|hit| Viewer
Upload -->|miss| Parse
Parse --> Cache
Cache --> Viewer
style Upload fill:#6366f1,stroke:#312e81,color:#fff
style Parse fill:#10b981,stroke:#064e3b,color:#fff
style Cache fill:#f59e0b,stroke:#7c2d12,color:#fff
style Viewer fill:#a855f7,stroke:#581c87,color:#fff
Key Features
| Feature | Description |
|---|---|
| Content-Addressable Cache | SHA-256 hash of file content as cache key. Client checks cache before upload |
| Parallel Processing | Geometry and data model processed concurrently with Rayon thread pool |
| Columnar Formats | Apache Parquet for geometry (15-50x smaller than JSON) |
| Progressive Streaming | SSE batches enable rendering while server processes |
| Full Data Model | Properties, relationships, and spatial hierarchy computed upfront and cached |
Data Flow
- Cache-First: Client computes SHA-256 hash locally, checks server cache
- Cache Hit: Geometry served directly from cache (skips upload entirely)
- Cache Miss: File uploaded, processed in parallel, cached, then served
- Streaming: Geometry batches streamed via SSE for progressive rendering
When to Use
| Scenario | Recommendation |
|---|---|
| Single file, one-time view | Client-only (@ifc-lite/parser) |
| Repeat access, team sharing | Server with caching |
| Large models (100+ MB) | Server with streaming |
| Offline/embedded apps | Client-only with local cache |
# Run the server locally
&&
# Or with Docker
Project Structure
ifc-lite/
โโโ rust/ # Rust/WASM backend
โ โโโ core/ # IFC/STEP parsing
โ โโโ geometry/ # Geometry processing
โ โโโ wasm-bindings/ # JavaScript API
โ
โโโ packages/ # TypeScript packages (25)
โ โโโ parser/ # High-level IFC parser
โ โโโ ifcx/ # IFC5 (IFCX) JSON parser
โ โโโ geometry/ # Geometry bridge (WASM)
โ โโโ renderer/ # WebGPU rendering
โ โโโ data/ # Columnar data structures
โ โโโ spatial/ # Spatial indexing
โ โโโ query/ # Query system
โ โโโ sdk/ # Scripting SDK (bim.* automation API)
โ โโโ lens/ # Rule-based filtering and colorization
โ โโโ lists/ # Configurable property tables and schedules
โ โโโ cache/ # Binary cache format
โ โโโ export/ # Export formats (glTF, Parquet)
โ โโโ encoding/ # IFC string/value encoding helpers
โ โโโ bcf/ # BIM Collaboration Format
โ โโโ ids/ # IDS validation
โ โโโ mutations/ # Property editing & change tracking
โ โโโ drawing-2d/ # 2D drawings (sections, plans)
โ โโโ codegen/ # EXPRESS schema generator
โ โโโ wasm/ # WASM bindings package
โ โโโ server-client/ # Server SDK (caching, streaming)
โ โโโ server-bin/ # Pre-built server binary
โ โโโ embed-sdk/ # iframe embedding SDK
โ โโโ embed-protocol/ # Shared embed protocol types
โ โโโ sandbox/ # QuickJS-in-WASM sandbox runtime
โ โโโ create-ifc-lite/ # Project scaffolding CLI
โ
โโโ apps/
โ โโโ viewer/ # React web application
โ โโโ server/ # Rust HTTP server (Axum)
โ โโโ desktop/ # Tauri desktop application
โ
โโโ docs/ # Documentation (MkDocs)
Performance
Bundle Size Comparison
| Library | WASM Size | Gzipped |
|---|---|---|
| IFClite | 0.65 MB | 0.26 MB |
| web-ifc | 1.1 MB | 0.4 MB |
| IfcOpenShell | 15 MB | - |
Viewer Benchmark Baseline (2026-02-21)
| Model | Size | First Geometry | Total Time | Meshes |
|---|---|---|---|---|
| FZK-Haus | 2.4MB | ~202ms | ~0.25s | 244 |
| Snowdon Towers | 8.3MB | ~217ms | ~0.59s | 1,556 |
| BWK-BIM | 326.8MB | ~5.43s | ~11.89s | 39,146 |
| Holter Tower | 169.2MB | ~3.05s | ~11.04s | 108,551 |
Source: local pnpm test:benchmark:viewer run with results stored in tests/benchmark/benchmark-results/.
For benchmark workflow and regression checks, see tests/benchmark/README.md.
Zero-Copy GPU Pipeline
- Zero-copy WASM to WebGPU: Direct memory access from WASM linear memory to GPU buffers
- 60-70% reduction in peak RAM usage
- 74% faster parse time with optimized data flow
- 40-50% faster geometry-to-GPU pipeline
Geometry Processing
- Up to 5x faster overall than web-ifc (median 2.18x, up to 104x on some files)
- Streaming pipeline with batched processing (100 meshes/batch)
- First geometry appears in ~202ms to ~5.43s on current baseline models
On-Demand Property Extraction (Client-Side)
When using @ifc-lite/parser directly in the browser:
- Properties and quantities are extracted lazily when accessed
- Initial parse skips expensive property table building
- Large files (100+ MB) stream geometry instantly while data loads in background
- CPU raycasting for picking in models with 500+ elements (no GPU buffer overhead)
See full benchmark data for per-file comparisons.
Viewer Loading Performance
End-to-end loading times measured with Playwright in headed Chrome (M1 MacBook Pro):
| Model | Size | Entities | Total Load | First Batch | Geometry (WASM Wait) | Data Model Parse |
|---|---|---|---|---|---|---|
| Large architectural | 327 MB | 4.4M | 11.9s | 5.43s | 2.98s | 3.16s |
| Tower complex | 169 MB | 2.8M | 11.0s | 3.05s | 5.60s | 2.07s |
| Small model | 8.3 MB | 147K | 0.59s | 217ms | 292ms | 110ms |
Architecture:
- Dedicated geometry worker: Large files (>50MB) use a Web Worker for geometry processing
- True parallelism: Geometry streams from worker while data model parses on main thread
- Model-dependent first batch: Small files can render in ~200ms; very large files can take several seconds
- Zero-copy transfer: ArrayBuffers transferred (not copied) between worker and main thread
Run benchmarks on your hardware:
&&
Results saved to tests/benchmark/benchmark-results/ with automatic regression detection.
Browser Requirements
| Browser | Minimum Version | WebGPU |
|---|---|---|
| Chrome | 113+ | โ |
| Edge | 113+ | โ |
| Firefox | 127+ | โ |
| Safari | 18+ | โ |
More Info: See Browser Requirements for WebGPU feature detection and fallbacks.
Desktop App (Tauri)
IFClite includes a native desktop application built with Tauri v2, providing enhanced performance over the web version.
Why Desktop?
| Feature | Web (WASM) | Desktop (Native) |
|---|---|---|
| Parsing | Single-threaded | Multi-threaded (Rayon) |
| Memory | WASM 4GB limit | System RAM |
| File Access | User upload only | Direct filesystem |
| Startup | Download WASM | Instant |
| Large Files | ~100MB practical limit | 500MB+ supported |
Architecture
The desktop app reuses the same Rust crates (ifc-lite-core, ifc-lite-geometry) as the WASM build, but compiled natively:
apps/desktop/
โโโ src/ # React frontend (shared with web)
โโโ src-tauri/
โ โโโ src/
โ โ โโโ commands/ # Tauri IPC commands
โ โ โ โโโ ifc.rs # parse_ifc_buffer, get_geometry
โ โ โ โโโ cache.rs # Binary caching system
โ โ โ โโโ file_dialog.rs
โ โ โโโ lib.rs # Tauri app setup
โ โโโ Cargo.toml # Native dependencies
โโโ package.json
Native Commands
The desktop app exposes these Tauri commands to the frontend:
| Command | Description |
|---|---|
parse_ifc_buffer |
Parse IFC with native multi-threading |
get_geometry |
Process geometry in parallel batches |
get_geometry_streaming |
Stream geometry progressively |
open_ifc_file |
Native file dialog integration |
get_cached / set_cached |
Binary cache for instant reload |
Building Releases
# Development
# Production builds
Output binaries are placed in apps/desktop/src-tauri/target/release/bundle/.
Development (Contributors)
For contributing to IFClite itself:
&&
# Add a changeset when making changes
# Rust/WASM development (optional - WASM is pre-built)
&&
Packages
Status indicators are updated against the current workspace package set and recent commit activity.
| Package | Description | Status | Docs |
|---|---|---|---|
create-ifc-lite |
Project scaffolding CLI | โ Stable | API |
@ifc-lite/parser |
STEP tokenizer & entity extraction | โ Stable | API |
@ifc-lite/ifcx |
IFC5 (IFCX) parser with ECS composition | ๐ง Beta | API |
@ifc-lite/geometry |
Geometry processing bridge | โ Stable | API |
@ifc-lite/renderer |
WebGPU rendering pipeline | โ Stable | API |
@ifc-lite/data |
Columnar data structures | โ Stable | API |
@ifc-lite/spatial |
Spatial indexing & culling | โ Stable | API |
@ifc-lite/query |
Fluent & SQL query system | โ Stable | API |
@ifc-lite/sdk |
Scripting SDK (bim.* automation API) |
๐ง Beta | API |
@ifc-lite/lens |
Rule-based 3D filtering and colorization | โ Stable | API |
@ifc-lite/lists |
Configurable property tables and schedules | โ Stable | API |
@ifc-lite/cache |
Binary cache for instant loading | โ Stable | API |
@ifc-lite/export |
Export (glTF, Parquet, IFC) with visible-only filtering | โ Stable | API |
@ifc-lite/encoding |
IFC string encoding/decoding and value parsing | โ Stable | API |
@ifc-lite/bcf |
BIM Collaboration Format (topics, viewpoints) | โ Stable | Guide |
@ifc-lite/ids |
IDS validation against IFC data | โ Stable | Guide |
@ifc-lite/mutations |
Property editing & change tracking | โ Stable | Guide |
@ifc-lite/drawing-2d |
2D section cuts, floor plans, elevations | โ Stable | Guide |
@ifc-lite/embed-sdk |
iframe embedding SDK for web integration | โ Stable | API |
@ifc-lite/embed-protocol |
Shared postMessage protocol for embedding | โ Stable | API |
@ifc-lite/server-client |
Server SDK with caching & streaming | โ Stable | API |
@ifc-lite/server-bin |
Pre-built server binary distribution | โ Stable | Guide |
@ifc-lite/wasm |
WASM bindings for Rust core | โ Stable | API |
@ifc-lite/codegen |
Code generation from EXPRESS schemas | โ Stable | API |
@ifc-lite/sandbox |
QuickJS-in-WASM sandboxed script execution | ๐งช Experimental | API |
@ifc-lite/viewer |
Viewer application package | โ Stable | Guide |
Rust Crates
| Crate | Description | Status | Docs |
|---|---|---|---|
ifc-lite-core |
STEP/IFC parsing | โ Stable | docs.rs |
ifc-lite-geometry |
Mesh triangulation | โ Stable | docs.rs |
ifc-lite-wasm |
WASM bindings | โ Stable | docs.rs |
ifc-lite-server |
HTTP server with parallel processing | โ Stable | API |
Community Projects
Projects built by the community using IFClite (not officially maintained):
| Project | Author | Description |
|---|---|---|
| bimifc.de | @holg | Pure Rust/Bevy IFC viewer, no TypeScript needed |
Built something with IFClite? Open a PR to add it here!
Contributing
We welcome contributions!
| Resource | Description |
|---|---|
| Development Setup | Prerequisites, installation, and project structure |
| Testing Guide | Running tests, writing tests, CI |
| Release Process | Versioning and publishing workflow |
# Fork and clone
# Create a branch
# Make changes and test
# Add a changeset to describe your changes
# Submit a pull request (include the changeset file)
License
This project is licensed under the Mozilla Public License 2.0.
Acknowledgments
- Built with nom for parsing
- earcutr for polygon triangulation
- nalgebra for linear algebra
- wasm-bindgen for Rust/JS interop