Plato is a small, pure, statically-typed language for writing geometric and numeric libraries once, and compiling them into fast, idiomatic code for other platforms. The C# backend is in daily production use — it generates the geometry library consumed by the Ara 3D SDK — and the TypeScript and Rust backends are working proofs of concept, each with a browser demo you can try right now.

Twelve geometry algorithms — Delaunay triangulation, convex hulls, BVHs, half-edge meshes, raycasting, and more — written once in Plato and running in your browser two different ways, from the same source file:

TypeScript sample browser — Plato compiled to TypeScript, rendered with Three.js.

Rust sample browser — the same Plato source compiled to Rust, built to WebAssembly, computing every sample live in the browser.

Both pass the same conformance suite: identical algorithms, identical seeds, identical results. To run them locally, see Demos below.

Plato looks like a typed scripting language and compiles like a systems language. Everything is an immutable value, every function is pure, and a compiler amplifies terse declarations into a large, monomorphized, zero-dispatch library: the entire Plato standard library is ~3,500 lines of source, which becomes over 11,000 lines of C#. A three-field vector type comes out the other side as a struct with ~340 members.

One source of truth. Your math library exists once. Every port is generated, so the ports can't drift.

Native-feeling output. C# gets packed structs and aggressive inlining; TypeScript gets fluent methods on plain numbers; Rust gets extension traits. Each target reads like it was written by hand, by someone who likes that language.

Performance by construction. Interface-generic code is monomorphized into direct calls — no boxing, no virtual dispatch, no runtime abstraction penalty.

Correctness by construction. Distinct types for Angle vs. Number and Point vs. Vector turn geometry's classic bugs into compile errors; purity makes every function a trivial unit-test target.

This is real code from the standard library — a circle, defined as data plus functions:

From those few lines, Circle gets a constructor, tuple conversions, deconstruction, equality, hashing, ToString, and immutable WithCenter/WithRadius setters — and because it implements ICurve2D, it can be sampled, converted to a polyline, and composed with everything else written against curves, none of which was written for Circle specifically.