DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk7 min

Porting FreeCAD to wasm64: What Broke After the Compile Succeeded

FreeCAD’s browser ports show why a successful WebAssembly compile is not proof of a usable GUI: clicks, event loops, rendering, ABI boundaries, and full workflows still have to work.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A successful compile and link proved that FreeCAD’s code could be turned into a WebAssembly module; it did not prove that the application could be used. Real clicks, asynchronous dialogs, browser graphics, memory and ABI boundaries, and workflows such as FEM exposed failures that scripted checks and a visible window could not catch. Two 2026 project accounts show the gap from different directions: Virtastic describes a wasm64 release, while magik.net describes a separate wasm32 implementation.

Why a successful build was only the first milestone

A desktop application is more than a set of object files that link. It assumes an operating system, a graphics stack, process and threading behavior, filesystem access, and a particular way of handling input and waiting for work. In a browser, those assumptions meet WebAssembly, JavaScript, browser APIs, and a constrained execution environment. A module can therefore compile and launch while still failing at the point where a person tries to use it.

As an Amazon Associate I earn from qualifying purchases.

The distinction is visible in Virtastic’s account of FreeCAD Web 1.0: scripted dialog checks passed, yet dialogs did not open when users clicked. Virtastic says 1,031 commits and an 8,500-line patch set across 18 upstream trees went into its 2026 effort, and notes that almost none of the time went into compile errors. The central challenge was making the compiled application behave correctly across browser boundaries, not just producing the binary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why dialogs and clicks failed when scripted checks passed

GUI code often expects to wait synchronously for a result. A modal Qt call such as exec() can enter a nested event loop on a desktop. In a browser, asynchronous execution and suspension rules change what can safely happen while that call is waiting. The magik.net wasm32 account says Qt’s WebAssembly platform plug-in needed exported functions and a suspendable event loop for this modal behavior; an early Qt message handler helped expose the problem.

Virtastic describes a related but distinct failure boundary: its dialog scripts passed, but real clicks did not open dialogs. The release account identifies JSPI restrictions on which exports may suspend, Qt-wasm keyboard focus behavior, incomplete GL emulation, and browser caching among the issues addressed. A test that calls a dialog path directly does not necessarily reproduce a browser click, focus transition, callback, and suspended event loop in combination.

The magik.net account also traces crashes during CAM/BIM activation and STEP import to modal dialogs invoked while an asynchronous activation pump was running. That interaction between a nested loop and asynchronous activation is an implementation-specific diagnosis, not a universal Qt failure. Separately, it reports that deferred widget deletion could leave a dangling Qt focus-proxy pointer; adding a liveness guard addressed that case.

Why rendering legacy OpenGL code took its own port

FreeCAD’s Coin3D rendering path uses fixed-function OpenGL patterns, including matrix stacks and immediate-mode calls. WebGL2 does not provide that legacy interface directly. The magik.net project describes building an emulator and an offscreen-framebuffer compositing path to bridge the rendering model, but getting a window on screen did not guarantee that geometry, overlays, or depth behaved correctly.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Its debugging account details a series of compatibility failures: different depth-clear defaults, rejected legacy queries, overlays that did not render as expected, missing draw calls, and stale scratch vertex-buffer-object bindings. In one reported case, correcting the vertex-array path moved the immediate-mode rendering path from approximately 1.3 frames per second to interactive behavior. That is magik.net’s project-specific report, not a general benchmark for FreeCAD or WebAssembly. The same account reports about a 22% improvement on a simple-scene rendering spin after performance work; it does not establish a matched comparison with Virtastic’s build.

The practical lesson is that rendering compatibility must be validated by actual scenes and interactions. A renderer that links may still issue unsupported calls, mishandle GPU state, omit draws, or perform too slowly for interactive use.

How exception formats, ABI boundaries, and callbacks caused traps

The magik.net implementation account describes a transition from Asyncify and JavaScript exceptions to JSPI and native exceptions. During that migration, legacy and newer WebAssembly exception encodings appeared together, and V8 rejected the mixture. The project reports using a Binaryen post-link normalization step and wrapping JavaScript callbacks to address the mismatch.

This is an example of a failure that appears far below the visible user interface: code may reach a callback and then trap because the caller and callee do not agree on an ABI detail. In another magik.net case, FEM parsing of a .vtu file trapped on an indirect call because bundled expat and its consumers disagreed about the ABI for XML_Size. Aligning the generated header fixed that specific mismatch. Emscripten’s documentation treats exception handling and JavaScript BigInt integration as build/runtime compatibility choices, rather than details that can be assumed to work identically in every configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which desktop assumptions had to change

Browser execution does not provide a desktop application with its familiar process model and host facilities unchanged. The magik.net account says work that expected threads was serialized, child-process behavior was replaced, and Python modules were registered statically instead of relying on dlopen. It also describes changes to resource paths and startup ordering. Virtastic’s release account identifies single-threaded CalculiX as a current limitation of its browser build.

Filesystem and sharing behavior also need precise boundaries. Virtastic says documents stay in browser storage until a user starts sharing a session; documents in a shared session are stored unencrypted on the session server. That server-side sharing statement should not be read as describing the default local-document path.

These changes are not incidental cleanup. They determine whether a feature can start, find its resources, invoke dependent code, and complete work within the browser’s execution model. WebAssembly specifies module imports rather than a universal set of host APIs or syscalls, so portability still depends on the environment that supplies those imports.

What the two reported browser builds claim

The accounts describe materially different implementations, not successive releases of one build. Their measurements and validation are project-reported, not independent comparative benchmarks.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Comparison Virtastic FreeCAD Web 1.0 (2026, wasm64) magik.net implementation (2026, wasm32)
Memory ceiling 16 GB stated ceiling, according to Virtastic’s release account. 4 GB stated ceiling, according to magik.net’s technical account.
Browser requirement Chrome or Edge 137 or newer; Virtastic says Firefox and Safari are refused because the required JSPI support is not yet shipped there. Chrome or Edge 137 or newer, according to magik.net.
Initial transfer or module size About 115 MB initial download, as reported by Virtastic. 196 MB raw module, as reported by magik.net.
Reported workload timing Virtastic says a 42 MB, 34-part project opened in about 20 seconds, and an 18 MB STL in about five seconds. Not stated for a directly comparable opening workload (magik.net technical account).
Graphics performance Not stated as a directly comparable rendering benchmark (Virtastic release account). Magik.net reports the immediate-mode path at approximately 1.3 fps before a vertex-array fix, and about a 22% improvement on a simple-scene rendering spin after performance work.
Threading and solver behavior CalculiX is single-threaded, according to Virtastic. Magik.net says work expecting threads was serialized; a comparable solver-threading figure is not stated in its technical account.
Feature and validation claims Virtastic reports all 20 workbenches activating on first click, about 500 upstream unit tests passing in the browser, FEM meshing and solving in the tab, and FEM results within 1% of beam theory across several cases. These are claims about its browser build and reported test cases. Magik.net describes FEM support work involving a VTK data-model subset and SMESH-related components. Comparable workbench coverage and a matching test count or FEM validation result are not stated in its technical account.
Format and add-on coverage Virtastic says its build supports multiple file formats and an Addon Manager; the release account does not provide a count of supported formats. Not stated as a comparable coverage claim (magik.net technical account).

WebAssembly’s wasm64 portability page describes linear memory above 4 GiB using 64-bit pointers or indices. That capability is relevant to large applications, but it does not mean every wasm64 application can use unlimited memory: Virtastic’s own release account gives its build a 16 GB ceiling. The wasm32 4 GB ceiling reported for magik.net’s separate implementation should not be attributed to Virtastic.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why FEM was a feature-validation problem, not just a compile target

In the magik.net account, loading a workbench was not enough to establish FEM functionality. The implementation first separated document restoration from mesh dependencies, then compiled a VTK data-model subset and SMESH-related components. That sequence reflects a dependency problem: restoring a document and generating or consuming a mesh bring different parts of the software stack into play.

Even after those components were available, the .vtu parsing path exposed the XML_Size ABI mismatch described above. The example shows why “FEM loads” and “FEM works” are different validation claims. A meaningful check needs to exercise the actual import, meshing, and solving paths in the named build. Virtastic separately reports FEM meshing and solving in the browser and results within 1% of beam theory across several cases; those remain Virtastic’s reported results, not evidence about the magik.net build.

What a useful browser-port validation plan should test

The failures in these accounts suggest validating behavior at the same boundaries where browser builds diverge from desktop assumptions, rather than treating compilation or scripted unit tests as the finish line.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Real input: Open dialogs and activate workbenches through actual pointer and keyboard interaction, including focus changes.
  • Asynchronous control flow: Exercise modal dialogs during activation and callback paths; check that suspended calls resume and that nested loops do not disrupt asynchronous work.
  • Rendering: Test representative geometry, depth, overlays, and repeated redraws in the supported browser graphics path, then measure interactive performance under a stated workload.
  • ABI and lifetime safety: Exercise callbacks, generated headers, indirect calls, exception paths, deferred widget deletion, and cross-language type boundaries.
  • Host assumptions: Verify resource lookup, module registration, file access, process replacements, and any work serialized because threads are unavailable or unsuitable.
  • End-to-end features: Import real files and run complete workflows such as mesh generation and solving; report the browser, build, input, and validation method with the result.

A passing test count is useful only within that scope. Virtastic’s reported browser unit-test total is evidence about its stated build and test run; it does not establish that a distinct wasm32 implementation shares those results or that every user workflow has been covered.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.