Universal Computational Manufacturing Compiler

Dry Machina

A high-performance toolpath compiler infrastructure with a Rust core, CLI, Python & TypeScript SDKs, and Cloudflare Edge API. Compiles algorithmic design intent into verified, physics-safe motion code across 3D printers, CNC mills, lasers, plasma torches, and 5-axis robotic arms.

Universal Corecrates/core owns multi-process lowering, simulation, verification, and G-code/KRL emitters.
Thin SDKsTypeScript & Python SDKs author parametric designs with units and query offline machine catalogs.
Edge & Cloud APICloudflare Worker + D1 SQLite running Rust WASM with sub-10ms latency and zero-egress R2 storage.
Physics & QualityBuilt-in scallop $R_a$, MRR spindle power load, corner deceleration, and tool holder collision detection.

Compiler Flow

Dry treats a machine path as a program: authoring surfaces produce L1 design operations, the core resolves them into L2 motion, then downstream passes analyze or emit target formats.

Repository Structure

The repo is split by responsibility: core compiler logic, bindings, web surfaces, documentation and conformance data. Generated build artifacts live beside some bindings but are not the conceptual source of truth.

Core

crates/core

Dependency-light Dry IR and engine. This is where L1 ops become L2 motion and where analysis, verification, import/export and codecs live.

CLI

crates/cli

The dry command exposes inspect, simulate, emit, verify, optimize, pack/unpack and G-code review workflows.

Binding

crates/wasm

wasm-bindgen adapter that brings the same Rust engine into the browser and TypeScript SDK build.

Python

py

PyO3 native module plus a Pythonic authoring layer. Tests compare SDK behavior with committed fixtures.

TypeScript

sdk/ts

Fluent TypeScript authoring SDK over the wasm engine, with reusable lattice and TPMS generators.

Web

web

Interactive gallery, Blockly visual authoring, shared Three.js viewer, static strategy pages and wasm smoke tests.

Data

conformance

Golden g-code, simulation outputs, gallery designs and printer profiles used to keep behavior stable.

Docs

docs

Vision, architecture, roadmap, conformance plan, task backlog, product directions and clean-room notes.

Design Contracts

The strongest architectural choice is keeping process behavior in the Rust core while adapters stay narrow. That keeps every surface aligned without cloning compiler logic.

Typed motion vocabulary

SegmentKind, units wrappers and serde-compatible wire values make the IR explicit while preserving readable JSON fixtures.

Explicit passes

Lowering, simulation, verification, optimization, emitting, importing and tracing are separate modules with focused tests.

Clean-room conformance

Dry validates behavior against committed corpora and keeps GPL reference code out of the released implementation.

Useful Entrypoints

These are the shortest paths into the project when developing, testing or demonstrating it locally.

Native CLI

cargo run -p dry-cli --bin dry -- emit conformance/gcode/square.json
cargo run -p dry-cli --bin dry -- verify conformance/gcode/square.json

Python SDK

cd py
maturin develop
pytest tests/ -q

Browser / wasm

bash web/build.sh
python3 -m http.server
# open /web/ or /web/blocks.html