Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 24 additions & 23 deletions ATTRIBUTION.md

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
RustDraft
DraftCraft™ (released as RustDraft)
Copyright (c) 2026 Skryx Dev.

RustDraft is based on CADCraft (https://github.com/storytold/cadcraft):
DraftCraft is based on CADCraft (https://github.com/storytold/cadcraft):
Copyright (c) 2026 ArtCraft Team and the CADCraft contributors.

Both are licensed under the MIT License or the Apache License, Version 2.0, at your option
(LICENSE-MIT, LICENSE-APACHE). RustDraft is not made, sponsored or endorsed by the ArtCraft Team
(LICENSE-MIT, LICENSE-APACHE). DraftCraft is not made, sponsored or endorsed by the ArtCraft Team
or the CADCraft project; it contains none of the ArtCraft names, wordmarks or logos.

DraftCraft™ and the DraftCraft logo are trademarks of WithShalom Studios, which created the name, the
logo and the app icon and first claimed the trademark. They are used in this repository by agreement
and are not covered by the license above: the code may be forked and redistributed, but a modified
version should not be presented as DraftCraft. Their terms are in docs/brand/LICENSE-brand.txt.

Third-party material

Software dependencies are listed in Cargo.lock. One is under a weak-copyleft licence: the acadrust
Expand All @@ -16,12 +21,12 @@ Mozilla Public License 2.0 and is used unmodified as a separate library (crates/
is available from crates.io and the repository above.


RustDraft's icons, drafting font, hatch patterns and linetypes are drawn or defined in code.
DraftCraft's icons, drafting font, hatch patterns and linetypes are drawn or defined in code.
The UI also bundles the egui font inputs described below. The per-file list is in ATTRIBUTION.md.
Builds made with the optional craft-fonts input (CRAFT_FONTS_DIR) embed the fonts listed in its
ATTRIBUTION.md, each under the SIL Open Font License 1.1.

RustDraft is an independent project and is not affiliated with, sponsored by or endorsed by
DraftCraft is an independent project and is not affiliated with, sponsored by or endorsed by
Autodesk, Inc. AutoCAD and DWG are trademarks of Autodesk, Inc.


Expand Down
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<p align="center">
<img src="assets/app-icon/rustdraft-256.png" width="160" alt="RustDraft icon">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="docs/brand/draftcraft-logo-dark.svg">
<img src="docs/brand/draftcraft-logo.svg" height="140" alt="DraftCraft™: a drafting compass that has just drawn an arc, on a dark blueprint-blue tile with a drafting grid, beside the name DraftCraft with Draft in bold">
</picture>
</p>

<h1 align="center">RustDraft</h1>

<p align="center">
<a href="https://ko-fi.com/K0O529L823"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support me on Ko-fi"></a>
<a href="https://discord.gg/34w9FmQXvz"><img height="30" src="https://img.shields.io/badge/Discord-Join%20the%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join the RustDraft Discord"></a>
<a href="https://discord.gg/34w9FmQXvz"><img height="30" src="https://img.shields.io/badge/Discord-Join%20the%20server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join the DraftCraft Discord"></a>
</p>

<p align="center">
Expand All @@ -20,13 +21,20 @@
<img alt="License: MIT or Apache-2.0" src="https://img.shields.io/badge/license-MIT%20%2F%20Apache--2.0-blue">
</p>

> [!NOTE]
> **DraftCraft™ was RustDraft.** The program is RustDraft by [SkryxDev](https://github.com/SkryxDev), built on
> [CADCraft](https://github.com/storytold/cadcraft); the DraftCraft name and logo are
> [WithShalom Studios](https://github.com/withshalom)' brand, used here by agreement
> ([`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt)). The rename is under way: the installers, the
> app bundle, the program files and the settings folder still carry the name RustDraft for now.

<p align="center">
<img src="docs/screenshots/rustdraft-ribbon.png" width="900" alt="RustDraft with the Home tab of the ribbon and the sample drawing: a mounting bracket with dimensions, a section view and a title block">
<img src="docs/screenshots/rustdraft-ribbon.png" width="900" alt="DraftCraft with the Home tab of the ribbon and the sample drawing: a mounting bracket with dimensions, a section view and a title block">
</p>

---

RustDraft is a 2D CAD application for drafting, dimensioning and plotting drawings, written from the
DraftCraft™ is a 2D CAD application for drafting, dimensioning and plotting drawings, written from the
ground up in Rust. It opens and saves **DWG** and **DXF** files, speaks AutoCAD's command names and prompts
at its command line, and puts everything in a **Windows-style ribbon** — the same on macOS, Windows and
Linux, so you find the tools where you expect them on any computer. It is also built to be driven by
Expand Down Expand Up @@ -142,15 +150,15 @@ icons for your menu.

Every package also contains `rustdraft-cli`, the headless command-line tool and MCP server.

**Updates** — when RustDraft starts it asks GitHub whether a newer release is out and, if there is one,
**Updates** — when DraftCraft starts it asks GitHub whether a newer release is out and, if there is one,
asks whether you want it: **Download** opens the release page. **Help › Check for Updates…** checks at any
time. That one request to `api.github.com` is all RustDraft sends; set `RUSTDRAFT_NO_UPDATE_CHECK=1` to turn
time. That one request to `api.github.com` is all DraftCraft sends; set `RUSTDRAFT_NO_UPDATE_CHECK=1` to turn
it off.

## Use it with AI agents

RustDraft ships an [MCP](https://modelcontextprotocol.io) server. Add it to Claude Desktop, Claude Code
or any MCP client, and the agent draws in the open RustDraft window while you watch (on macOS it opens
DraftCraft ships an [MCP](https://modelcontextprotocol.io) server. Add it to Claude Desktop, Claude Code
or any MCP client, and the agent draws in the open DraftCraft window while you watch (on macOS it opens
the app when needed):

```json
Expand Down Expand Up @@ -199,7 +207,7 @@ cargo build --release -p rustdraft -p rustdraft-cli
The programs are written to `target/release/` (`rustdraft` and `rustdraft-cli`). The interface fonts for
Chinese, Japanese, Korean, Arabic, Thai and more come from the optional
[craft-fonts](https://github.com/storytold/craft-fonts) repository: clone it and set
`CRAFT_FONTS_DIR=/path/to/craft-fonts` before building to embed them. Without it RustDraft uses the fonts
`CRAFT_FONTS_DIR=/path/to/craft-fonts` before building to embed them. Without it DraftCraft uses the fonts
installed on your system.

The quality checks — formatting, clippy, tests, asset licences, crate layering and the web build — run
Expand Down Expand Up @@ -242,14 +250,14 @@ apps/
command runs behind a guard that restores the drawing and reports an error instead of crashing.
- **Drawing happens on the GPU** through wgpu (Metal, DirectX 12, Vulkan), with a CPU fallback.
- **No borrowed artwork.** Every icon is drawn in code, and the hatch patterns, linetypes and drafting
font are RustDraft's own definitions; [ATTRIBUTION.md](ATTRIBUTION.md) lists every asset file.
font are DraftCraft's own definitions; [ATTRIBUTION.md](ATTRIBUTION.md) lists every asset file.

Settings, logs and autosaves live in `~/Library/Application Support/RustDraft` on macOS,
`%APPDATA%\RustDraft` on Windows and `~/.config/rustdraft` on Linux.

## Status

RustDraft is young. 2D drafting, dimensioning, layouts and plotting work; 3D modelling is not there yet,
DraftCraft is young. 2D drafting, dimensioning, layouts and plotting work; 3D modelling is not there yet,
and some object types that DWG/DXF files can contain can be lost on save. [ROADMAP.md](ROADMAP.md) lists
what works, what is missing and what comes next.

Expand All @@ -264,15 +272,21 @@ Pull requests are welcome too: fork the repository, make your change on a branch

## License

RustDraft is licensed under the [MIT License](LICENSE-MIT) or the [Apache License 2.0](LICENSE-APACHE),
DraftCraft is licensed under the [MIT License](LICENSE-MIT) or the [Apache License 2.0](LICENSE-APACHE),
at your option. Third-party material is listed in [NOTICE](NOTICE) and [ATTRIBUTION.md](ATTRIBUTION.md).

DraftCraft™ and the DraftCraft logo are trademarks of WithShalom Studios, who first made the name and the
trademark claim. The licences above cover the code, not the name or the logo: you may fork and redistribute
the code, but a modified version should not be presented as DraftCraft. Their terms are in
[docs/brand/LICENSE-brand.txt](docs/brand/LICENSE-brand.txt).

## Credits

Made by **[SkryxDev](https://github.com/SkryxDev)**.
Made by **[SkryxDev](https://github.com/SkryxDev)**. The DraftCraft™ name and logo are by
**[WithShalom Studios](https://github.com/withshalom)**.

RustDraft is based on [CADCraft](https://github.com/storytold/cadcraft) by the ArtCraft Team and the
DraftCraft is based on [CADCraft](https://github.com/storytold/cadcraft) by the ArtCraft Team and the
CADCraft contributors, used under the same MIT OR Apache-2.0 licence; their copyright notice is kept in
[LICENSE-MIT](LICENSE-MIT) and [NOTICE](NOTICE). RustDraft is an independent project: it is not made,
[LICENSE-MIT](LICENSE-MIT) and [NOTICE](NOTICE). DraftCraft is an independent project: it is not made,
sponsored or endorsed by them, and it is not affiliated with, sponsored by or endorsed by Autodesk, Inc.
AutoCAD and DWG are trademarks of Autodesk, Inc., named here only to describe compatibility.
2 changes: 1 addition & 1 deletion apps/rustdraft-cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn convert_long_about() -> &'static str {
})
}

/// rustdraft-cli: headless RustDraft
/// rustdraft-cli: headless DraftCraft
#[derive(Parser)]
#[command(name = "rustdraft-cli", version = rustdraft_engine::build_version(), arg_required_else_help = true)]
pub(crate) struct Cli {
Expand Down
4 changes: 2 additions & 2 deletions apps/rustdraft-cli/tests/it/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn help_flags_print_help_to_stdout_and_exit_zero() {
let out = Command::new(env!("CARGO_BIN_EXE_rustdraft-cli")).args(args).output().expect("run rustdraft-cli");
assert!(out.status.success(), "{args:?}: {:?}", out.status);
let stdout = String::from_utf8_lossy(&out.stdout);
assert!(stdout.starts_with("rustdraft-cli: headless RustDraft\n"), "{args:?}: {stdout:?}");
assert!(stdout.starts_with("rustdraft-cli: headless DraftCraft\n"), "{args:?}: {stdout:?}");
assert!(String::from_utf8_lossy(&out.stderr).is_empty(), "{args:?}: stderr should be empty");
}
}
Expand All @@ -19,5 +19,5 @@ fn bare_invocation_reports_on_stderr() {
let out = Command::new(env!("CARGO_BIN_EXE_rustdraft-cli")).output().expect("run rustdraft-cli");
assert_eq!(out.status.code(), Some(2));
assert!(out.stdout.is_empty(), "bare invocation keeps its help on stderr");
assert!(String::from_utf8_lossy(&out.stderr).starts_with("rustdraft-cli: headless RustDraft\n"));
assert!(String::from_utf8_lossy(&out.stderr).starts_with("rustdraft-cli: headless DraftCraft\n"));
}
8 changes: 4 additions & 4 deletions apps/rustdraft-cli/tests/it/usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ fn top_level_requests() {
run_cases(
"top",
&[
case("--help", &["--help"], 0, Line("rustdraft-cli: headless RustDraft"), Empty),
case("-h", &["-h"], 0, Line("rustdraft-cli: headless RustDraft"), Empty),
case("help", &["help"], 0, Line("rustdraft-cli: headless RustDraft"), Empty),
case("--help", &["--help"], 0, Line("rustdraft-cli: headless DraftCraft"), Empty),
case("-h", &["-h"], 0, Line("rustdraft-cli: headless DraftCraft"), Empty),
case("help", &["help"], 0, Line("rustdraft-cli: headless DraftCraft"), Empty),
case("--version", &["--version"], 0, Starts("rustdraft-cli "), Empty),
case("-V", &["-V"], 0, Starts("rustdraft-cli "), Empty),
case("version is not a subcommand", &["version"], 2, Empty, Line("error: unrecognized subcommand 'version'")),
case("bare", &[], 2, Empty, Line("rustdraft-cli: headless RustDraft")),
case("bare", &[], 2, Empty, Line("rustdraft-cli: headless DraftCraft")),
case("unknown subcommand", &["foo"], 2, Empty, Line("error: unrecognized subcommand 'foo'")),
case("unknown top-level flag", &["--bogus"], 2, Empty, Line("error: unexpected argument '--bogus' found")),
case("empty subcommand", &[""], 2, Empty, Line("error: unrecognized subcommand ''")),
Expand Down
4 changes: 2 additions & 2 deletions apps/rustdraft-web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RustDraft</title>
<title>DraftCraft</title>
<link data-trunk rel="rust" data-bin="rustdraft-web" data-wasm-opt="z" data-weak-refs />
<style>
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #22282f; }
Expand All @@ -14,6 +14,6 @@
</head>
<body>
<canvas id="rustdraft_canvas"></canvas>
<div id="rustdraft_loading">Loading RustDraft&hellip;</div>
<div id="rustdraft_loading">Loading DraftCraft&hellip;</div>
</body>
</html>
4 changes: 2 additions & 2 deletions apps/rustdraft-web/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl Bridge {
/// The engine's delivery hook in host mode ([`rustdraft_engine::cmd::file::set_deliver`]): hand
/// the file to the host page. `Ok` once it was sent; the engine then counts a drawing as saved.
pub fn deliver(name: &str, _mime: &str, bytes: &[u8]) -> Result<(), String> {
let bridge = BRIDGE.with(|b| b.borrow().clone()).ok_or("the page that embeds RustDraft is gone")?;
let bridge = BRIDGE.with(|b| b.borrow().clone()).ok_or("the page that embeds DraftCraft is gone")?;
bridge.post_save(name, bytes)
}

Expand All @@ -99,7 +99,7 @@ pub fn deliver(name: &str, _mime: &str, bytes: &[u8]) -> Result<(), String> {
fn receive_open(name: &str, data: &FileData, inbox: &crate::upload::Inbox) {
let name = if name == "document" { DEFAULT_NAME } else { name }.to_string();
let FileData::Bytes(array) = data else {
inbox.refuse(format!("Open: {name} came as a File; RustDraft reads bytes"));
inbox.refuse(format!("Open: {name} came as a File; DraftCraft reads bytes"));
return;
};
// Refuse an oversized drawing before copying it into the app's memory (the data's own length).
Expand Down
30 changes: 15 additions & 15 deletions apps/rustdraft-web/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ mod web {
match result {
Ok(()) => el.remove(),
Err(e) => {
el.set_inner_html(&format!("<p>RustDraft failed to start: {e:?}</p><p>A browser with WebGPU or WebGL2 is required.</p>"))
el.set_inner_html(&format!("<p>DraftCraft failed to start: {e:?}</p><p>A browser with WebGPU or WebGL2 is required.</p>"))
}
}
}
Expand All @@ -229,8 +229,8 @@ fn wants_cpu(query: &str) -> bool {
#[cfg(any(target_arch = "wasm32", test))]
fn document_title(name: Option<&str>, dirty: bool) -> String {
match name.filter(|n| !n.trim().is_empty()) {
Some(name) => format!("{name}{} — RustDraft", if dirty { " •" } else { "" }),
None => "RustDraft".to_string(),
Some(name) => format!("{name}{} — DraftCraft", if dirty { " •" } else { "" }),
None => "DraftCraft".to_string(),
}
}

Expand Down Expand Up @@ -295,30 +295,30 @@ mod tests {
/// bullet; a blank or missing name leaves the app name alone and never shows a bullet.
#[test]
fn viewport_title_names_the_document_and_marks_unsaved_changes() {
assert_eq!(document_title(Some("drawing.dwg"), false), "drawing.dwg — RustDraft");
assert_eq!(document_title(Some("drawing.dwg"), true), "drawing.dwg • — RustDraft");
assert_eq!(document_title(Some("Drawing1"), false), "Drawing1 — RustDraft");
assert_eq!(document_title(None, false), "RustDraft");
assert_eq!(document_title(None, true), "RustDraft");
assert_eq!(document_title(Some(" "), true), "RustDraft");
assert_eq!(document_title(Some("drawing.dwg"), false), "drawing.dwg — DraftCraft");
assert_eq!(document_title(Some("drawing.dwg"), true), "drawing.dwg • — DraftCraft");
assert_eq!(document_title(Some("Drawing1"), false), "Drawing1 — DraftCraft");
assert_eq!(document_title(None, false), "DraftCraft");
assert_eq!(document_title(None, true), "DraftCraft");
assert_eq!(document_title(Some(" "), true), "DraftCraft");
}

/// Guards the change signal: a title is sent on open, rename, dirty change and close, but
/// never twice in a row, so an idle tab is not repainted by a repeated title command.
#[test]
fn viewport_title_follows_open_rename_and_dirty_changes_only() {
let mut sent = None;
assert_eq!(title_to_send(&mut sent, Some("drawing.dwg"), false).as_deref(), Some("drawing.dwg — RustDraft"));
assert_eq!(title_to_send(&mut sent, Some("drawing.dwg"), false).as_deref(), Some("drawing.dwg — DraftCraft"));
// The page already has it: send nothing.
assert_eq!(title_to_send(&mut sent, Some("drawing.dwg"), false), None);
// Unsaved changes add the bullet.
assert_eq!(title_to_send(&mut sent, Some("drawing.dwg"), true).as_deref(), Some("drawing.dwg • — RustDraft"));
assert_eq!(title_to_send(&mut sent, Some("drawing.dwg"), true).as_deref(), Some("drawing.dwg • — DraftCraft"));
// A rename shows the new name.
assert_eq!(title_to_send(&mut sent, Some("plan.dwg"), true).as_deref(), Some("plan.dwg • — RustDraft"));
assert_eq!(title_to_send(&mut sent, Some("plan.dwg"), true).as_deref(), Some("plan.dwg • — DraftCraft"));
// Saving clears it again.
assert_eq!(title_to_send(&mut sent, Some("plan.dwg"), false).as_deref(), Some("plan.dwg — RustDraft"));
assert_eq!(title_to_send(&mut sent, Some("plan.dwg"), false).as_deref(), Some("plan.dwg — DraftCraft"));
// Closing the last drawing leaves the app name only.
assert_eq!(title_to_send(&mut sent, None, false).as_deref(), Some("RustDraft"));
assert_eq!(title_to_send(&mut sent, None, false).as_deref(), Some("DraftCraft"));
assert_eq!(title_to_send(&mut sent, None, false), None);
}

Expand All @@ -336,6 +336,6 @@ mod tests {
assert!(push_title(&mut sent, Some("drawing.dwg"), true, |title| written.push(title.to_owned())));
// Closing the drawing writes the app name.
assert!(push_title(&mut sent, None, false, |title| written.push(title.to_owned())));
assert_eq!(written, ["drawing.dwg — RustDraft", "drawing.dwg • — RustDraft", "RustDraft"]);
assert_eq!(written, ["drawing.dwg — DraftCraft", "drawing.dwg • — DraftCraft", "DraftCraft"]);
}
}
4 changes: 2 additions & 2 deletions apps/rustdraft/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ fn main() {
if std::path::Path::new("../../assets/app-icon/rustdraft.ico").exists() {
res.set_icon("../../assets/app-icon/rustdraft.ico");
}
res.set("ProductName", "RustDraft")
.set("FileDescription", "RustDraft computer-aided design")
res.set("ProductName", "DraftCraft")
.set("FileDescription", "DraftCraft computer-aided design")
.set("CompanyName", "Skryx Dev")
.set(
"LegalCopyright",
Expand Down
Loading
Loading