cadcraft README

The project's README from github.com/storytold/cadcraft. As one markdown file: README.md.

ArtCraft

CADCraft

Computer-aided design and drafting; an open-source, clean-room reimplementation of Autodesk AutoCAD, rebuilt in pure Rust.

A fast, open-source take on the AutoCAD workflow: the command line, object snaps, layers, dimensions, hatches, blocks and DXF drawings you already know. It runs natively on macOS, Windows, Linux and FreeBSD, and in the browser via WebAssembly.
By the ArtCraft team.

Written in Rust Runs on macOS, Windows, Linux, FreeBSD and the web License: MIT OR Apache-2.0 Agent-drivable over MCP Status: early development

Join the ArtCraft community on Discord

CADCraft on getartcraft.com · ArtCraft · All Crafting Apps


CADCraft with an apartment floor plan open: hatched grey walls, blue windows, green door swings, furniture outlines, yellow room names with areas, a yellow room schedule table, a multileader note and cyan dimensions with architectural ticks; Tool Sets on the left, Layers and Properties on the right, the command line at the bottom
Apartment plan (examples/apartment.dxf): walls with pick-point hatching, TrueType MTEXT room labels, a TABLE, a multileader and architectural dimensions — built entirely from CADCraft commands.

[!NOTE] ArtCraft is a community of artists from all walks of life. Painters, photographers, filmmakers, illustrators, designers, animators, hobbyists, and people who picked up a pencil last week. If you make things, you're one of us. Come say hi on Discord.

Screenshots · Why CADCraft · What works today · Quick start · Agents, MCP and the CLI · Architecture · Roadmap · Downloads · The Crafting Apps · License and credits

Screenshots

A paper-space layout in CADCraft: a white sheet with a dashed printable area and a viewport showing the apartment plan at scale, the status bar showing the A1 Plan layout tab and a PAPER toggle CADCraft with a mounting bracket part drawing: front view with bolt holes, centre lines and dimensions, a hatched section view, notes and a title block
Layouts: paper space with viewports, page setups and PLOT to PDF. Double-click a viewport to work in model space through it. Mounting bracket: a two-view part drawing with centre lines, hidden lines, an ANSI31 section hatch and a title block.

Why CADCraft

What works today

CADCraft is in early, fast development. Honest status (see ROADMAP.md for parity numbers):

Area Status
Drawing area Model space with adaptive grid, axes, pan/zoom (wheel, middle-drag, pinch), crosshair cursor with pickbox, UCS icon, ViewCube, viewport label
Command line Prompts with keywords, history, AutoComplete, aliases, @dx,dy, @d<a, #x,y, direct distance entry, Enter/space/right-click to repeat, transparent commands, .scr-style scripts
Draw LINE, PLINE (arcs, widths), CIRCLE (center/radius/diameter, 2P, 3P), ARC, RECTANG (fillet/chamfer), POLYGON, ELLIPSE (+arcs), SPLINE, POINT, XLINE, RAY, DONUT, TEXT, MTEXT
Modify ERASE, MOVE, COPY, ROTATE, SCALE, MIRROR, STRETCH, OFFSET, TRIM, EXTEND, FILLET, CHAMFER, BREAK, JOIN, EXPLODE, rectangular/polar ARRAY, draw order, OVERKILL
Precision Object snaps (endpoint, midpoint, center, geometric center, node, quadrant, intersection, insertion, perpendicular, tangent, nearest; deferred tangent/perpendicular for the first point of a line, e.g. belt lines tangent to two circles), polar tracking, ortho, grid snap
Layers & properties Layers palette and Layer Properties Manager (on/off, freeze, lock, plot, colour, linetype), layer tools (isolate, freeze, off, lock, match, previous), Properties palette with per-object editing, linetypes, lineweights, colour index and true colour
Annotation All DIM* commands with full DIMSTYLE variables, overrides and every arrowhead, associative dimensions that follow geometry, MLEADER, TABLE, TrueType fonts (.ttf, .otf, .ttc collections), MTEXT formatting codes (fonts, heights, colours, stacked fractions), our own single-stroke drafting font
Hatch & blocks Pick-point hatch boundaries with islands, pattern, solid and gradient fills from our own pattern library, BLOCK/INSERT, attributes and nested blocks
Files DXF read (R12–2018, ASCII and binary) and write (R2000), including dimension styles, associativity, tables and constraints; DWG read (via the acadrust library) and write (R2000); PDF plotting, SVG and PNG export. Entities CADCraft doesn't model yet are not kept on save: see file-format parity
Layouts & plotting Paper-space layouts, viewports (scale, lock, per-viewport layer freeze), MSPACE/PSPACE through viewports, page setups, PLOT and EXPORTPDF
Parametric Geometric and dimensional constraints, AUTOCONSTRAIN, PARAMETERS with expressions, conflict detection; constraints re-solve after every edit
Grips Hot grips with Space to cycle Stretch, Move, Rotate, Scale and Mirror
Interface languages English and Ukrainian (Українська), live switching and a remembered Auto/system-language choice; details
Automation MCP server, JSON control channel, cadcraft-cli (info, convert, run, commands, mcp)

Quick start

Desktop and web UI builds require Rust 1.95 or later. The core workspace's declared minimum remains Rust 1.90.

git clone https://github.com/storytold/cadcraft
cd cadcraft
cargo run --release -p cadcraft -- --sample       # opens the sample drawing

Then try typing at the command line:

line 0,0 @10,0 @0,5 c          a closed triangle
circle 5,2 1                    a circle
offset 0.25                     then pick the circle and a side
zoom e                          zoom to extents

The web build: cd apps/cadcraft-web && trunk serve (needs trunk).

Fonts

CADCraft never ships fonts; it uses the TrueType/OpenType fonts installed on your system. SHX fonts (including big fonts such as chineset.shx) aren't read yet: text in an SHX style is drawn with our own stroke font, and any character a text's font lacks (CJK, for example) is drawn from an installed font that has it, preferring wide-coverage fonts such as Noto Sans CJK, Source Han Sans, WenQuanYi, PingFang or Microsoft JhengHei. Two settings, set with SETVAR or (for every run) an environment variable, steer this:

Variable Environment Meaning
FONTALT CADCRAFT_FONTALT Font used instead of a text style font that can't be found (an SHX file, a missing TTF), by file or family name, e.g. Noto Sans CJK TC. Empty (default) = our stroke font.
FONTFALLBACK CADCRAFT_FONTFALLBACK Fonts tried first for characters a text's font lacks, comma-separated, e.g. Noto Sans CJK TC, msjh.ttc.

. clears either one.

Logs

The desktop app writes its log records to standard error and to logs/cadcraft.log in the settings directory (Linux and the BSDs ~/.config/cadcraft/logs/, or $XDG_CONFIG_HOME/cadcraft/logs/; macOS ~/Library/Application Support/CADCraft/logs/; Windows %APPDATA%\CADCraft\logs\; or under CADCRAFT_CONFIG_DIR). A start from a desktop menu or the Dock has no terminal, so this file is what to attach to a bug report. Each launch moves the previous log to cadcraft.1.log (and that one to cadcraft.2.log), so the log of a run that crashed survives the next start. The file stops growing at 16 MiB. --version writes no file.

Variable Effect
CADCRAFT_CONFIG_DIR Use this directory instead of the platform settings directory (the log goes to its logs/)
RUST_LOG Log levels for standard error and the log file. Default: info for CADCraft's own crates, warn for everything else. env_logger-style directives replace that, e.g. RUST_LOG=debug, RUST_LOG=warn,cadcraft_io=trace or RUST_LOG=info,wgpu_core=warn; a directive ending in * covers every target starting with it (cadcraft*=debug). cadcraft_engine=debug also logs every command-line message.

The logger is apps/cadcraft/src/logging.rs; the web build logs to the browser console instead.

Drive it from agents, MCP and the CLI

# MCP server on stdio, headless:
cadcraft-cli mcp
# …or bridged to the running app (start it with --control 7979):
cadcraft-cli mcp --connect 127.0.0.1:7979

# One-shot headless runs:
cadcraft-cli run --sample --script 'CIRCLE 22,3 1\n' --save out.dxf --export out.png
cadcraft-cli info drawing.dxf
cadcraft-cli convert drawing.dxf drawing.svg

# Frame part of the drawing (model space, drawing units, lower-left corner first):
cadcraft-cli convert drawing.dwg detail.png --window 0,0,20000,15000
cadcraft-cli run drawing.dwg --cmd 'zoom {"mode":"window","p1":[0,0],"p2":[20000,15000]}' --export detail.png
cadcraft-cli run drawing.dwg --cmd 'select {"window":[[0,0],[20000,15000]]}' --cmd 'zoom {"mode":"object"}' --export sel.png

How image exports (PNG 2400×1600, SVG, PDF) are framed: convert fits the model-space extents. run --export shows the current view when the script or commands changed it (zoom, pan, view.set, …) and otherwise fits the extents too. --window x0,y0,x1,y1 shows exactly that rectangle, centred and scaled without distortion; --view extents or --view current forces either framing. To frame a selection set, zoom {"mode":"object"} after selecting.

MCP tools include command_line (type at the prompt), execute (any command with JSON), inspect_drawing, query_entities, render (returns a PNG) and, when connected to the app, screenshot and ui_click. The desktop app's JSON control channel is documented in docs/control-protocol.md.

Architecture

geom ─┐                       f64 geometry: arcs, bulges, splines, intersections, offsets
dxf   │  (standalone)         DXF tag reader/writer
color ┤                       colour index, true colour
doc   ┤                       drawing database, copy-on-write entity store (cheap undo)
fonts ┤ render               stroke font + TEXT/MTEXT layout │ display lists, linetypes, hatches, dims, CPU raster
io    ┤                       DXF mapping, SVG/PNG export
engine┤                       sessions, commands, command line + prompts, snaps, selection, undo
ui-egui · mcp                 the swappable egui front end · MCP server
apps: cadcraft · cadcraft-cli · cadcraft-web

Nothing below ui-egui knows about egui, so the front end can be replaced. cargo xtask ci checks formatting, clippy, tests, asset attribution, the crate layering and the wasm build.

Drafting and layer-palette icon buttons use the pinned craft-ui button component for interaction, accessible labels and keyboard focus. CADCraft keeps its multicolor icon painter, dark palette, disabled tint and tool commands. The native host saves workspace visibility and toolset choices atomically; CADCRAFT_CONFIG_DIR selects an isolated profile. Compact toolbar groups move into a More menu, and status readouts truncate with a full-value tooltip before they reach layout tabs. Painted toolbar and tab controls have accessible labels and visible keyboard focus. Property controls remain application-specific.

Accessibility

Over the drawing area CADCraft hides the system cursor and draws its own crosshair. Tools that follow the system cursor (Windows Magnifier set to follow or centre the mouse pointer, other screen magnifiers, screen recorders, remote desktops) lose track of it there. Turn on View ▸ Accessibility ▸ Show System Cursor to keep a small system crosshair visible at the centre of the drawn one, or start CADCraft with the environment variable CADCRAFT_SYSTEM_CURSOR=1 (on Windows, set it once with setx CADCRAFT_SYSTEM_CURSOR 1 and start CADCraft again). Agents can switch it with the control channel: ui.set {"systemCursor": true}.

Roadmap

See ROADMAP.md for the stage, measured parity and the estimate of remaining work, and docs/gaps.md for everything still missing.

Downloads

Download CADCraft from GitHub: the latest release has every build listed below, and all releases has earlier versions and their notes. <ver> in the file names is the version number, and SHA256SUMS.txt lists a checksum for every file.

Windows

Build Installer Portable
x64 (64-bit Intel/AMD) cadcraft-<ver>-windows-x64.msi cadcraft-<ver>-windows-x64-portable.zip
arm64 (Snapdragon and other ARM PCs) cadcraft-<ver>-windows-arm64.msi cadcraft-<ver>-windows-arm64-portable.zip
x86 (32-bit) cadcraft-<ver>-windows-x86.msi cadcraft-<ver>-windows-x86-portable.zip

Installers and executables are code-signed.

The installer adds CADCraft to the Start menu and asks whether to add a desktop shortcut too (unticked by default). For a silent install with the desktop shortcut: msiexec /i cadcraft-<ver>-windows-x64.msi /qn DESKTOPSHORTCUT=1.

If the app doesn't open on Windows: the desktop app initializes only DirectX 12 by default. Letting wgpu also create an OpenGL instance can crash some graphics drivers (AMD's atio6axx.dll) before the window appears, so the app would flash in Task Manager and quit. WGPU_BACKEND overrides the default for troubleshooting (for example dx12 or vulkan). In PowerShell, from the folder containing the executable:

$env:WGPU_BACKEND = "vulkan"
& .\cadcraft.exe
Remove-Item Env:WGPU_BACKEND                     # restore the default for later launches

An explicit gl override can bring the driver crash back on affected systems. The macOS, Linux and web backend defaults are unchanged.

macOS

Build File Notes
App, universal (Apple silicon + Intel) cadcraft-<ver>-macos-universal.dmg Signed and notarized
Command-line tool, universal cadcraft-cli-<ver>-macos-universal.zip Signed and notarized

Linux

Format x86_64 aarch64 (ARM64) Notes
AppImage cadcraft-<ver>-linux-x86_64.AppImage cadcraft-<ver>-linux-aarch64.AppImage Runs anywhere; updates itself with AppImageUpdate (.zsync files)
Flatpak cadcraft-<ver>-linux-x86_64.flatpak cadcraft-<ver>-linux-aarch64.flatpak Sandboxed; flatpak install --user <file>
Debian/Ubuntu cadcraft-<ver>-linux-x86_64.deb cadcraft-<ver>-linux-aarch64.deb
Fedora/RHEL/openSUSE cadcraft-<ver>-linux-x86_64.rpm cadcraft-<ver>-linux-aarch64.rpm
Tarball cadcraft-<ver>-linux-x86_64.tar.gz cadcraft-<ver>-linux-aarch64.tar.gz Unpack anywhere

RISC-V (riscv64): cadcraft-<ver>-linux-riscv64.tar.gz, cross-compiled; needs glibc 2.39 or newer (Ubuntu 24.04+, Debian 13+).

FreeBSD

Build File
x86_64 cadcraft-<ver>-freebsd-x86_64.tar.gz

Web (WebAssembly)

Build File Notes
Static site cadcraft-web-<ver>.zip Runs in a modern browser; host it on any static server

The Crafting Apps

CADCraft is one of the Crafting Apps: free, open-source creative tools from the ArtCraft team, each written from scratch in Rust and each able to stand on its own.

App What it's for Code Learn more
PhotoCraft Image editing: layers, masks, type and real PSD files GitHub Website
VectorCraft Vector illustration GitHub Website
FilmCraft Video editing, color and sound GitHub Website
LightCraft Photo library and raw development GitHub Website
PdfCraft Reading, organizing and protecting PDFs GitHub Website
EffectCraft Motion graphics and visual effects GitHub Website
DesignCraft Page layout and publishing GitHub Website
CADCraft Computer-aided design and drafting · you are here GitHub Website

And ArtCraft itself, our AI image and video studio for artists who want real control.


Join the ArtCraft community on Discord

Come make things with us

Our Discord is where artists of every kind hang out: people who paint, shoot, draw, cut film, set type, and people still figuring out what they like to make. Share what you're working on, ask for help, tell us what's broken, or tell us what you wish these tools could do. Whatever your medium and however long you've been at it, you're welcome here.

discord.gg/artcraft · getartcraft.com · The Crafting Apps · CADCraft

License and credits

CADCraft is dual-licensed under MIT or Apache-2.0, at your option. Copyright (c) 2026 ArtCraft Team and the CADCraft contributors. Required notices are in NOTICE.

Bundled fonts, icons, images and other assets keep their own open licenses; each one is listed with its author, source and license in ATTRIBUTION.md.

CADCraft's icons, its single-stroke drafting font, its hatch patterns and its linetypes are all original work, drawn or defined in code. The sample drawings are generated in code too.

The ArtCraft name, wordmark and logos in docs/brand/ are trademarks of the ArtCraft Team and are not covered by this license. They may be used only unmodified, and only as part of this repository and CADCraft, under docs/brand/LICENSE-brand.txt. Forks and modified versions must remove them.

Autodesk, AutoCAD and DWG are trademarks or registered trademarks of Autodesk, Inc. in the United States and/or other countries. CADCraft is an independent, open-source project and is not affiliated with, sponsored by or endorsed by Autodesk, Inc.; these names are used only to describe the workflows and file formats it is compatible with.

ArtCraft
Made by the ArtCraft team and community.

Tool Sets, Layers, and Properties can be regrouped, split, floated within the app window, closed, and reopened. The drawing canvas stays visible and cannot be closed or turned into a tab. Drag a panel header to a target edge or another header. Its context menu offers Float panel, Move to group, and Close panel. Existing panel toggles reopen panels at their saved location; Reset Panel Layout restores the app layout. Floating panels remain inside the current app window.

cadcraft (storytold/cadcraft)

Searching Database…

这是什么?CADCraft 是一个开源的净室(clean-room)重实现项目,重现了 AutoCAD 风格的计算机辅助设计与绘图软件,完全使用纯 Rust 构建。
这是一个完整的桌面 CAD 应用,还是只是一个文件格式库?它是一个带图形界面和命令行的完整独立应用,覆盖完整的 AutoCAD 风格工作流:命令、对象捕捉、图层、标注、填充、图块和 DXF 图纸。
我怎么让 CADCraft 跑起来?从下载板块获取适合你操作系统的预构建版本——macOS 通用 .dmg、Windows .msi/便携版 zip、Linux AppImage/Flatpak/deb/rpm/tarball、FreeBSD tarball,或者通过静态网站在浏览器中运行 WebAssembly 版本。
我需要先安装额外的运行时或工具吗?不需要——Windows/macOS/Linux/FreeBSD 版本都是自包含的签名安装程序或便携压缩包,网页版只需要一个现代浏览器。
它能打开真正的 AutoCAD DWG 文件吗?README 只提到支持 DXF 图纸,并明确指出 CADCraft 是一个独立的净室项目,与 Autodesk 没有任何关联——并未宣称 DWG 兼容。
这是谁做的,为什么要做?它由 ArtCraft 团队打造,是其“Crafting Apps”系列之一——一套免费开源的创意工具(PhotoCraft、VectorCraft、FilmCraft 等),每一款都用 Rust 从零编写。
它也能在 Linux 和浏览器里运行,还是仅限桌面操作系统?是的——它可以在 macOS、Windows、Linux 和 FreeBSD 上原生运行,还有可在任何现代浏览器中运行的 WebAssembly 版本。
Crafting Apps 家族还有哪些应用?除 CADCraft 外,还有 PhotoCraft(图像编辑)、VectorCraft(矢量插画)、FilmCraft(视频剪辑)、LightCraft(照片库/RAW 处理)、PdfCraft、EffectCraft(动态图形)和 DesignCraft(页面排版),全部是 ArtCraft 出品的独立 Rust 应用。
AI 智能体或 MCP 工具能与 CADCraft 交互吗?README 有专门的“智能体、MCP 与 CLI”章节,表明 CADCraft 暴露了命令行和 MCP 接口,让 AI 智能体能以编程方式驱动绘图工作流。
我能看看它能画什么的示例吗?仓库附带示例图纸,例如一张公寓平面图(墙体、填充、MTEXT 标签、表格、多重引线、标注)和一张带剖面填充和标题栏的安装支架零件图,全部由 CADCraft 命令生成。
下载的构建版本经过验证/签名吗?是的——Windows 和 macOS 的安装程序/可执行文件都经过代码签名(macOS 还经过公证),每个发布版都附带 SHA256SUMS.txt 校验和文件供验证。
Creator
storytold
Size
4.6 MB
Stars
5.6K
Age
11d
Commits · 90 Days