Skip to content
Hacker News front page

FreeCAD runs in a browser tab, compiled from 1.5M lines of C++ to WebAssembly

FreeCAD in the Browser

magik.net ported the full FreeCAD desktop app to the browser: parametric modeling, 17+ workbenches, and an embedded Python runtime. The port took 4 days using the AI tool Fable, with all 48 prompts published. First load is ~96 MB compressed; it requires Chrome/Edge 137+ for WebAssembly JSPI, which Firefox and Safari don't ship yet. The core trick is statically linking OpenCASCADE, Coin3D, CPython 3.14, PySide6, and VTK into a single 196 MB wasm module. A hand-written 900-line fixed-function-to-WebGL2 emulator handles rendering, and JSPI suspends the wasm stack to preserve QDialog::exec() semantics for modal dialogs. The post claims this is the first time PySide6 and pivy run in a browser—I'd take that with a grain of salt since no independent verification is provided, but the technical walkthrough is detailed.

Why it matters: magik.net spent 4 days and 48 prompts compiling FreeCAD's 1.5 million lines of C++ to WebAssembly in the browser, keeping parametric modeling, 17-plus workbenches and the embedded Python environment intact.

Read the original ↗Export Markdown