Version 1.0.0 is out18 Oct 2026

SSPUR

A programming language for AI agents to write, read and maintain.

Statically typed and effect-tracked. Contracts are checked at run time, fuzzed and proved, and it compiles to native code that runs faster than idiomatic C++ with the same safety checks.

Get started Try it in the playground

cart.sspchecked by sspur 1.0.0
type Item = {name: Str, price: Int where _ >= 0, qty: Int where _ > 0} fn total(items: List[Item]) -> Int  post r >= 0= items.map(_.price * _.qty).sum fn discount(amount: Int where _ >= 0, pct: Int) -> Int  pre pct >= 0 and pct <= 100  post r <= amount= amount - amount * pct / 100 fn main() -> Unit ! log= do  pen = Item{name: "pen", price: 3, qty: 4}  book = Item{name: "book", price: 12, qty: 1}  log("total: {discount(total([pen, book]), 10)}") test empty = total([]) == 0test sale = discount(24, 10) == 22
$ sspur run cart.ssptotal: 22$ sspur test cart.ssp2 passed, 0 failed
A small SSPUR program with a refinement type, a precondition, postconditions, an effect row and tests, and its output.

Install

macOS, Linux and Windows, on arm64 and x86_64. Native compilation uses clang.

macOS, with Homebrew

brew install sspurlang/sspur/sspur

Linux and macOS, with the install script

curl -fsSL https://github.com/sspurlang/sspur/releases/latest/download/install.sh | sh

It verifies the release's SHA-256 checksum and installs sspur into ~/.local/bin.

Windows, in PowerShell

irm https://github.com/sspurlang/sspur/releases/latest/download/install.ps1 | iex

It verifies the checksum, installs sspur.exe and adds it to your user PATH. Native compilation needs LLVM and the Visual Studio Build Tools.

Other ways to installRelease v1.0.0 and its checksumsEditor setup

Why SSPUR

Native speed

0.14xthe time of idiomatic C++ on records, lists and trees, and below 1x on all seven benchmark workloads

An optimizing native compiler, with C++ at clang -O2 and the same safety checks on both sides. Overflow, out-of-bounds access and contract violations always trap; the compiler proves most of those checks away, reuses memory in place and fuses pipelines into single loops.

Native benchmarks

Effects and contracts

Every side effect is in the signature, so a reviewer can see what a function may do:

fn save(u: User) -> Unit ! db.write, log

pre, post and refinement types like Int where _ > 0 are checked at run time, turned into property tests by the fuzzer and proved with Z3 where possible.

Contracts and tests

Batteries included

  • HTTP client
  • HTTP/1.1 server with TLS
  • SQLite
  • Argon2id
  • Ed25519
  • XChaCha20-Poly1305
  • JSON
  • CSV
  • gzip and zstd
  • Time zones
  • Debugger
  • Formatter

Typed rows with db.query[User], json.decode[T] for any type, and sspur debug on lldb or gdb with SSPUR names.

Standard library

Made for agents

0.67xthe tokens of Python on 17 multi-step coding tasks, every hidden test passing

Atomic edits that typecheck the whole codebase, typed holes that fill themselves, an MCP server, a language server and editor support from VS Code to Zed.

SSPUR for AI agents

A registry on GitHub

23packages in the registry, each checked when it was published

sspur add NAME pins a version to a commit and a source snapshot, and the lock pins each dependency by the hash of its exports.

Browse packages

Sites

Featured packages

6 of 23 Browse all