Desktop App¶
IFClite includes a native desktop application built with Tauri v2, providing enhanced performance over the web version by using native Rust code instead of WebAssembly.
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 |
The desktop app reuses the same Rust crates (ifc-lite-core, ifc-lite-geometry) as the WASM build, but compiled natively with full multi-threading support.
Installation¶
Prerequisites¶
- Node.js 18+
- pnpm 8+
- Rust toolchain (stable)
- Platform-specific dependencies: see Tauri Prerequisites
Development¶
Building Releases¶
cd apps/desktop
# Build for current platform
pnpm build
# Platform-specific builds
pnpm build:windows # Windows (.exe, .msi)
pnpm build:macos # macOS (.app, .dmg) - Universal (Intel + Apple Silicon)
pnpm build:linux # Linux (.deb, .AppImage)
Output binaries are placed in apps/desktop/src-tauri/target/release/bundle/.
Architecture¶
apps/desktop/
├── src/ # React frontend (shared with web viewer)
├── 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 frontend React code is shared between web and desktop. The desktop version uses Tauri IPC commands instead of WASM calls for parsing and geometry processing.
Native Commands¶
The desktop app exposes these Tauri commands to the frontend:
| Command | Description |
|---|---|
parse_ifc_buffer |
Parse IFC with native multi-threading (Rayon) |
get_geometry |
Process geometry in parallel batches |
get_geometry_streaming |
Stream geometry progressively to the renderer |
open_ifc_file |
Native file dialog for opening IFC files |
get_cached / set_cached |
Binary cache for instant reload of previously opened files |
Binary Caching¶
The desktop app includes a binary caching system that stores parsed results on disk. When reopening a previously loaded file:
- File hash is computed (SHA-256)
- Cache is checked for matching hash
- If cached, geometry and data model are loaded instantly (no re-parsing)
- If not cached, file is parsed and result is cached for next time
This makes reopening large files nearly instantaneous.
Differences from Web Version¶
The desktop and web versions share the same React UI, but differ in:
- Parsing backend: Native Rust vs WASM
- Threading: Rayon thread pool vs single-threaded WASM
- File access: Direct filesystem vs browser upload
- Memory: No WASM 4GB limit
- Caching: Disk-based binary cache vs browser cache/IndexedDB
- Startup: No WASM download needed