Open-source geometric constraint solver
  • Rust 98.8%
  • Just 0.8%
  • Python 0.2%
  • JavaScript 0.1%
Find a file
Adam Chalmers 62b2c95b94
Release ezpz 0.2.22 (#243)
Fixes:

- LinesAtAngle reverts to measuring the previous angle, as in 0.2.20
Regression from 0.2.21
 - Restore degeneracy check in LinesAtAngle. Regression from 0.2.21
2026-04-03 18:36:34 +00:00
.cargo Add a profile for cargo mutants (#216) 2025-12-30 16:45:51 +00:00
.github/workflows Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
ezpz Release ezpz 0.2.22 (#243) 2026-04-03 18:36:34 +00:00
ezpz-cli Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
ezpz-wasm Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
fuzz Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
test_cases [BUG]: Point on arc changes when constrained even with good initial guesses (#221) 2026-01-27 14:46:40 -06:00
.gitignore Update .gitignore to include mutants.out.old 2025-12-23 10:42:45 -06:00
_typos.toml Move newton-faer fork into this repo (#45) 2025-09-02 20:51:05 +00:00
AGENTS.md Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
Cargo.lock Release ezpz 0.2.22 (#243) 2026-04-03 18:36:34 +00:00
Cargo.toml Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
CHANGELOG.md Release ezpz and newton-faer 0.1.3 (#126) 2025-10-22 13:52:39 +00:00
clippy.toml Replace more f64 calls with libm (#171) 2025-12-11 16:03:32 -06:00
CONTRIBUTING.md (feature): adds API on Constraint to get var ids (#235) 2026-03-31 12:54:52 -05:00
justfile Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
LICENSE Add LICENSE file (MIT) (#174) 2025-12-11 22:47:13 +00:00
pr-desc.md [BUG]: Point on arc changes when constrained even with good initial guesses (#221) 2026-01-27 14:46:40 -06:00
README.md Rename kcl-ezpz to ezpz (#230) 2026-03-07 12:32:19 -06:00
symbolic solver plan.png Compile to WASM (#4) 2025-08-21 20:00:05 -05:00

EZPZ

Constraint solver for use in Zoo Design Studio, or wherever you want to use it.

Overview

This project has 3 Rust crates:

  • ezpz: The core constraint solver library. This is the primary crate for ezpz.
  • ezpz-cli: A CLI tool that lets you easily solve, analyze and benchmark constraint systems using ezpz.
  • ezpz-wasm: A WebAssembly library that wraps ezpz and exposes a few core functions. Intended for the ezpz maintainers to check if ezpz compiles and works in WebAssembly, and to benchmark its performance vs. native code.
  • Users probably won't need to use this library yourself, it's really intended as a sample application for the maintainers to test with.
  • Users should probably integrate ezpz into your web projects directly.

Development

New developers should read CONTRIBUTING.md

Using the CLI

The CLI lets you pass a constraint problem file (described below) and analyze it, solve it, visualize the solution and benchmark how long it took.

Here's a quick video demo:

https://github.com/user-attachments/assets/adbd223f-cfc1-4f5a-8b2c-84352862e02a

First, install it. From this repo's root, run:

cargo install --path ezpz-cli

Then you can use it like this, by passing it a constraint problem file:

$ ezpz --filepath myconstraints.md
Problem size: 2000 rows, 2000 vars
Iterations needed: 2
Solved in 2943μs (mean over 100 iterations)
i.e. 339 solves per second

You can also add the --gnuplot option to visualize the resulting points in a gnuplot window, or --gnuplot-png-path points.png to write the visualization to a PNG at the given path instead. If you'd rather print the final points to stdout and process them in your own tool, use --show-points instead.

Constraint problem files

ezpz defines a text format for writing out constraint problems. You don't have to use this format -- you can use the Rust library directly -- but it's a very convenient format. It looks like this:

# constraints
point p
point q
p.x = 0
p.y = 0
q.y = 0
vertical(p, q)

# guesses
p roughly (3, 4)
q roughly (5, 6)

There's two sections, Constraints and Guesses. You define each point (like p and q) and once defined, you can write constraints that use them. For example, you can fix a point's X or Y component (p.x = 0). Or you can relate two points, e.g. vertical(p, q).

For more examples, see the test_cases/ directory.