Skip to content
Breaking:

LuaCAD Launches Scriptable Parametric CAD Engine Built on Rust and Lua

The open-source tool embeds Lua 5.4 in a Rust core for direct CSG evaluation and broad mesh export options.

By The Company Wire3 min read
Share
LuaCAD — LuaCAD Launches Scriptable Parametric CAD Engine Built on Rust and Lua
LuaCAD — LuaCAD Launches Scriptable Parametric CAD Engine Built on Rust and Lua. Photo: web.

Software developer circles saw the introduction of LuaCAD, a new open-source tool designed for programmatic 2D and 3D computer-aided design, as first reported on Hacker News. The project provides developers and designers with a scriptable environment to generate parametric models written directly in the Lua programming language.

Underneath its scripting API, LuaCAD pairs embedded Lua 5.4 with an execution engine constructed in Rust. Constructive solid geometry (CSG) calculations are evaluated locally using the Manifold geometric library, though users can also configure the system to generate OpenSCAD code for external rendering pipelines.

For file production, the framework supports a wide variety of mesh and spatial data structures, including 3MF, STL, OBJ, PLY, OFF, AMF, and SCAD, alongside direct PNG image rendering. Command-line utilities `convert` and `watch` automatically infer the target format based on output file extensions, while a `--via-openscad` option lets users delegate mesh generation to an installed OpenSCAD binary.

Workflow integration for 3D printing is emphasized through the tool's 3MF export capabilities. Each distinct value returned by a script is converted into an independent 3MF object, enabling modern slicer applications to manipulate parts separately. Designers can label individual components using a `:name(...)` method, whereas formats that do not support multi-part structures automatically flatten all geometry into a single mesh.

The software features built-in compatibility for the Belfry OpenSCAD Library v2 (BOSL2), which has been reimplemented directly inside LuaCAD. This allows scripts to preview, render, and export BOSL2 geometry without needing OpenSCAD or the BOSL2 library installed on the host system. Exporting directly to `.scad` format maintains short, readable files by writing native BOSL2 function calls.

Text rendering and asset importing are also supported natively. The `text()` function outlines system typography into 2D sketches, while `text3d()` extrudes font outlines into 3D shapes in a single step. The `import()` command handles all supported 3D mesh formats and converts them into solid geometry, while vector formats like SVG and DXF load as extrudable 2D sketches.

Building LuaCAD requires a C++ compiler and CMake, though both underlying crates vendor their standard C and C++ dependencies. The core `luacad` crate builds Manifold and Clipper2, whereas the extended `luacad-studio` package incorporates OpenCSG for interface rendering, requiring OpenGL and graphics libraries such as `libgl1-mesa-dev`, `libx11-dev`, `libxcb1-dev`, `libxkbcommon-dev`, `libxrandr-dev`, and `libwayland-dev` on Debian and Ubuntu systems.

Sources

  1. Hacker News

Company: LuaCAD

Written by

The Company Wire

Newsroom · San Francisco

Inside the companies building what’s next. Reporting on startups, technology, funding and the people shaping them.