Fast · Lightweight · Columnar · Browser-native
|
|
Features · Quick Start · Desktop App · Architecture · Server · Performance · Contributing
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).
~650 KB WASM (~260 KB gzipped) • 2.6x faster • IFC4X3 + IFC5 support
| 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 | Progressive geometry processing. First triangles in 300-500ms |
| 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 |
Get started instantly without cloning the repo:
npx create-ifc-lite my-ifc-app
cd my-ifc-app
npm install && npm run parseOr create a React viewer:
npx create-ifc-lite my-viewer --template react
cd my-viewer
npm install && npm run devAdd IFClite to your existing project:
npm install @ifc-lite/parserimport { IfcParser } from '@ifc-lite/parser';
const parser = new IfcParser();
const result = parser.parse(ifcBuffer);
console.log(`Found ${result.entities.length} entities`);For full 3D rendering, add geometry and renderer packages:
npm install @ifc-lite/parser @ifc-lite/geometry @ifc-lite/rendererFor Rust projects:
cargo add ifc-lite-coreuse ifc_lite_core::parse_ifc;
let result = parse_ifc(&ifc_bytes)?;
println!("Parsed {} entities", result.entities.len());For contributing or running the full demo app:
git clone https://github.com/louistrue/ifc-lite.git
cd ifc-lite
pnpm install
pnpm build # Build all packages first
pnpm dev # Start the viewerOpen http://localhost:5173 and load an IFC file.
Note: Requires Node.js 18+ and pnpm 8+. No Rust toolchain needed - WASM is pre-built.
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.
Run IFClite as a native desktop application with enhanced performance:
cd apps/desktop
pnpm install
pnpm dev # Development mode
pnpm build # Build for current platformBuild for specific platforms:
pnpm build:windows # Windows (.exe, .msi)
pnpm build:macos # macOS (.app, .dmg)
pnpm build:linux # Linux (.deb, .AppImage)Note: Requires Rust toolchain for building. See Tauri Prerequisites.
import { IfcParser } from '@ifc-lite/parser';
import { Renderer } from '@ifc-lite/renderer';
// Parse IFC file
const parser = new IfcParser();
const result = parser.parse(ifcArrayBuffer);
// Access entities
const walls = result.entities.filter(e => e.type === 'IFCWALL');
console.log(`Found ${walls.length} walls`);
// Render geometry (requires @ifc-lite/renderer)
const renderer = new Renderer(canvas);
await renderer.loadGeometry(result.geometry);
renderer.render();| Resource | Description |
|---|---|
| Quick Start | Parse your first IFC file in 5 minutes |
| Installation | Detailed setup for npm, Cargo, and from source |
| User Guide | Complete guides: parsing, geometry, rendering, querying |
| Tutorials | Build a viewer, custom queries, extend the parser |
| Architecture | System design with detailed diagrams |
| API Reference | TypeScript, Rust, and WASM API docs |
| Contributing | Development setup and testing guide |
flowchart LR
IFC[IFC File] --> Tokenize
Tokenize --> Scan --> Decode
Decode --> Tables[Columnar Tables]
Decode --> Graph[Relationship Graph]
Tables --> Renderer[WebGPU Renderer]
Graph --> Export[glTF / Parquet]
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 Renderer fill:#a855f7,stroke:#581c87,color:#fff
style Export fill:#a855f7,stroke:#581c87,color:#fff
IFC files flow through three processing layers. See the Architecture Documentation for detailed diagrams including data flow, memory model, and threading.
Deep Dive: Data Flow · Parsing Pipeline · Geometry Pipeline · Rendering Pipeline
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
| 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 |
- 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
| 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
cd apps/server && cargo run --release
# Or with Docker
docker run -p 3001:3001 ghcr.io/louistrue/ifc-lite-serverifc-lite/
├── rust/ # Rust/WASM backend
│ ├── core/ # IFC/STEP parsing (~2,000 LOC)
│ ├── geometry/ # Geometry processing (~2,500 LOC)
│ └── wasm-bindings/ # JavaScript API (~800 LOC)
│
├── packages/ # TypeScript packages
│ ├── parser/ # High-level IFC parser
│ ├── geometry/ # Geometry bridge (WASM)
│ ├── renderer/ # WebGPU rendering
│ ├── cache/ # Binary cache format
│ ├── server-client/ # Server SDK (caching, streaming)
│ ├── query/ # Query system
│ ├── data/ # Columnar data structures
│ ├── spatial/ # Spatial indexing
│ ├── export/ # Export formats
│ └── codegen/ # Schema generator
│
├── apps/
│ ├── viewer/ # React web application
│ ├── server/ # Rust HTTP server (Axum)
│ └── desktop/ # Tauri desktop application
│
└── docs/ # Documentation (MkDocs)
| Library | WASM Size | Gzipped |
|---|---|---|
| IFClite | 0.65 MB | 0.26 MB |
| web-ifc | 1.1 MB | 0.4 MB |
| IfcOpenShell | 15 MB | - |
| Model Size | IFClite | Notes |
|---|---|---|
| 10 MB | ~100-200ms | Small models |
| 50 MB | ~600-700ms | Typical models |
| 100+ MB | ~1.5-2s | Complex geometry |
Based on benchmark results across 67 IFC files.
- 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
- 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 triangles visible in 300-500ms
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.
End-to-end loading times measured with Playwright in headed Chrome (M1 MacBook Pro):
| Model | Size | Entities | Total Load | First Batch | Geometry | Data Model |
|---|---|---|---|---|---|---|
| Large architectural | 327 MB | 4.4M | 17s | 1.2s | 9s | 5s |
| Tower complex | 169 MB | 2.8M | 14s | 0.8s | 7s | 3s |
| Small model | 8 MB | 147K | 1.0s | 50ms | 500ms | 200ms |
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
- First batch < 1.5s: Users see geometry within 1-1.5 seconds, even for 327MB files
- Zero-copy transfer: ArrayBuffers transferred (not copied) between worker and main thread
Run benchmarks on your hardware:
pnpm --filter viewer build && pnpm test:benchmark:viewerResults saved to tests/benchmark/benchmark-results/ with automatic regression detection.
| Browser | Minimum Version | WebGPU |
|---|---|---|
| Chrome | 113+ | ✅ |
| Edge | 113+ | ✅ |
| Firefox | 127+ | ✅ |
| Safari | 18+ | ✅ |
More Info: See Browser Requirements for WebGPU feature detection and fallbacks.
IFClite includes a native desktop application built with Tauri v2, providing enhanced performance over the web version.
| 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 |
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
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 |
cd apps/desktop
# Development
pnpm dev
# Production builds
pnpm build # Current platform
pnpm build:windows # x86_64-pc-windows-msvc
pnpm build:macos # universal-apple-darwin (Intel + Apple Silicon)
pnpm build:linux # x86_64-unknown-linux-gnuOutput binaries are placed in apps/desktop/src-tauri/target/release/bundle/.
For contributing to IFClite itself:
git clone https://github.com/louistrue/ifc-lite.git
cd ifc-lite
pnpm install
pnpm dev # Start viewer in dev mode
pnpm build # Build all packages
pnpm test # Run tests
# Add a changeset when making changes
pnpm changeset # Describe your changes (required for releases)
# Rust/WASM development (optional - WASM is pre-built)
cd rust && cargo build --release --target wasm32-unknown-unknown
bash scripts/build-wasm.sh # Rebuild WASM after Rust changes| 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/cache |
Binary cache for instant loading | ✅ Stable | API |
@ifc-lite/query |
Fluent & SQL query system | 🚧 Beta | API |
@ifc-lite/data |
Columnar data structures | ✅ Stable | API |
@ifc-lite/spatial |
Spatial indexing & culling | 🚧 Beta | API |
@ifc-lite/export |
Export (glTF, Parquet, etc.) | 🚧 Beta | API |
@ifc-lite/server-client |
Server SDK with caching & streaming | ✅ Stable | API |
| 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 |
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!
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
git clone https://github.com/YOUR_USERNAME/ifc-lite.git
# Create a branch
git checkout -b feature/my-feature
# Make changes and test
pnpm test
# Add a changeset to describe your changes
pnpm changeset
# Submit a pull request (include the changeset file)This project is licensed under the Mozilla Public License 2.0.
- Built with nom for parsing
- earcutr for polygon triangulation
- nalgebra for linear algebra
- wasm-bindgen for Rust/JS interop
Made with ❤️ for the AEC industry
