HAX
← Back

XCAD: Forking CAD with Rust & Open Source

2025-05-18Fabo Hax

The CAD market has been dominated for decades by legacy C++ engines and commercial GUIs. While these tools remain industry standards, they come with heavy baggage: monolithic codebases, memory-safety pitfalls, limited extensibility, and increasingly unsustainable costs. XCAD proposes an alternative. A Rust-native, open source CAD engine and interface, XCAD is designed from the ground up using modern software paradigms. Its goal is to solve the structural issues plaguing current CAD platforms while unlocking web, mobile, and collaborative workflows by default.

The Current CAD Landscape

The dominant players—AutoCAD, SolidWorks, CATIA, Revit—are deeply entrenched, with backend geometry powered by kernels like Parasolid, ACIS, and OpenCASCADE. These tools have been built over decades in C++, optimized for industrial reliability but constrained by their age. Commercial pressure adds to the complexity. Annual licensing and per-seat subscriptions create steep entry barriers, especially for small studios, startups, and educational institutions. Vendor lock-in often traps users in upgrade cycles and closed ecosystems. Under the hood, the codebases are difficult to evolve. Their C++ foundations suffer from slow compilation times, obscure bugs due to manual memory management, and patchwork extensibility. Features are often bolted on rather than integrated cleanly. Collaboration is another challenge. Outside of a few cloud-native offerings, multi-user real-time design remains elusive or locked behind proprietary walls.

Key Issues with Today’s Solutions

One of the most glaring issues is reliability. CAD kernels written in C++ are prone to segmentation faults and undefined behavior, especially under complex operations such as solid-solid Booleans or edge-trimmed surface blending. Debugging these issues can take days and is often inaccessible to anyone without deep C++ experience.

Performance also suffers from old paradigms. Most kernels execute Booleans and constraints on a single thread. When working with assemblies involving thousands of parts or BIM models with dense relationships, this becomes a major bottleneck.

Extensibility is another wall. Want to implement a new geometry operator or analysis plugin? In most CAD systems, this requires extending or wrapping low-level C++ classes, recompiling large swaths of code, and testing across inconsistent APIs. And when it comes to interface design, modern UX is often compromised by legacy UI frameworks, leading to fragmented workflows and dated interaction models.

Lastly, today’s CAD tools are overwhelmingly desktop-bound. The lack of browser-native engines or portable WASM modules limits accessibility. Remote work, cross-platform sync, and low-cost collaboration are all underserved.

Why Rust? The Case for a Native Geometry Kernel

Rust introduces strong guarantees that map directly to the needs of a robust, performant CAD engine. Its memory safety model—powered by ownership and borrowing—eliminates entire classes of bugs like use-after-free or buffer overflows, without relying on garbage collection. This dramatically reduces crash rates and improves long-term maintainability.

Concurrency is another strength. Rust’s data safety guarantees enable fearless multithreading. This means geometric operations, mesh tessellations, and constraint-solving can be parallelized across cores without risking data races.

The modularity of Rust’s ecosystem, based on crates, promotes clean abstractions. You can build focused components like xcad-brep for solid modeling, xcad-nurbs for spline handling, or xcad-sketcher for 2D constraints—all independently developed and tested, yet fully interoperable. Tooling is first-class. Cargo makes dependency management, testing, and continuous integration simple. Builds are fast and incremental. Docs are auto-generated and standardized. These conveniences speed up development and make it easier for new contributors to onboard. Finally, Rust compiles smoothly to WebAssembly. This opens the door to high-performance CAD engines that run directly in the browser, making full-fledged modeling possible on tablets, phones, or any device with a browser.

XCAD Architecture Draft

XCAD’s architecture centers around several key modules. The core kernel (xcad-kernel) is split into reusable crates. xcad-topo manages topological structures—vertices, edges, faces—as immutable graphs. xcad-brep handles boundary representation logic, including shell construction and Boolean operations. xcad-nurbs is a pure-Rust implementation of splines and surfaces. The 2D sketcher module (xcad-sketcher) integrates a constraint solver to enable parametric drawing. Changes to dimensions or relations automatically reflow sketches in real time. This system is built using native Rust optimization crates, allowing high performance and full transparency.

For the interface, XCAD adopts a dual-mode approach. On desktop, xcad-ui is built using egui or eframe—lightweight, native-ready GUI frameworks. On the web, it leverages React or web-sys to deliver a browser-native experience. Both layers interact with the same backend via WASM bindings.

The interoperability layer (xcad-interop) supports file I/O for formats like STEP, IGES, DXF, and IFC. Parsing is done with fast Rust libraries, with optional FFI hooks to IfcOpenShell when needed.

XCAD is also designed for extensibility. Each plugin or workbench is just another crate—sandboxed, hot-reloadable, and API-verified at compile time. This allows developers to contribute without forking the core or dealing with complex build chains.

WebAssembly and the Browser Frontier

Compiling Rust to WASM is a mature process. XCAD uses wasm-pack and wasm-bindgen to generate .wasm binaries and JavaScript glue code. These modules can be loaded into any PWA, collaborative platform, or educational tool with a single import.

Rendering is handled via WebGL or WebGPU. In Rust, the wgpu crate abstracts this layer, producing high-performance visuals that scale across browsers and GPUs. Alternatively, geometry data can be streamed to JavaScript renderers like Three.js or Babylon.js.

For collaboration, XCAD layers in WebRTC for peer-to-peer messaging and CRDTs for real-time synchronization of model state. This architecture allows low-latency, multi-user editing directly in the browser—no central server required.

Benefits and Impact

The implications are significant. An open source, Rust-native CAD engine under the MIT or Apache license opens up innovation to anyone—researchers, indie devs, educators, or companies building vertical solutions. The zero-cost model lowers barriers in underserved regions, while modularity and performance make it viable for production use.

Cross-platform capability is native. The same core runs on Windows, macOS, Linux, or in a browser. Mobile apps can be compiled from the same base using tools like Tauri or React Native with WASM.

Finally, the architectural flexibility of XCAD means future integrations—AI-assisted modeling, generative design, VR/AR visualization—aren’t just possible, they’re expected. This is not a monolith; it’s a platform.

Conclusion

CAD shouldn’t be locked inside legacy binaries or behind thousand-dollar paywalls. With Rust, we can build something better—safer, faster, and more open. XCAD is the beginning of that conversation. It’s not just a new tool—it’s a new foundation for how we design and collaborate in the 21st century.

Sign Up to Stay Sync:

menu