Maat: Rust-based Zero-Knowledge Programming Language

Today, we're open-sourcing our flagship project: Maat -- a Turing-complete programming language designed from the ground up for writing zero-knowledge proofs (ZKPs). Rust syntax, Rust semantics, ZK-only execution. If you write Rust, you already know Maat. And every construct that's illegal in a zero-knowledge circuit -- floating-point arithmetic, global mutable state, raw pointers, dynamic dispatch, I/O -- is a compile-time error in Maat. There is no "standard mode." Every program that compiles is provable by construction. We started with a single question: what if a language was Rust-native but ZK-constrained from day one? That question became 11 releases, 14 compiler crates, and a production-quality pipeline: - A logos DFA lexer and winnow combinator parser - Hindley-Milner type inference (Algorithm W) with generics, algebraic data types, and exhaustive pattern matching - Structs, enums, traits, impl blocks, `Option<T>`, `Result<T, E>`, and the `?` operator - A file-based module system with dependency resolution, cross-module type checking, and visibility enforcement - A stack-based bytecode VM with 44 opcodes and deterministic execution - A standard library with higher-order methods on collections, typed numeric parsing, and comparison utilities - Security hardening: `#![forbid(unsafe_code)]` across all 14 crates, checked arithmetic on every operation, 7M+ fuzz runs with zero crashes, 9 property-based tests verifying type soundness and execution determinism, and a published threat model This is where Proof-Driven Development (PDD) begins -- software development where formal verification and mathematical proofs replace trust assumptions. The compiler frontend is complete. Next is the ZK backend. Version 0.12 will introduce a trace-generating VM that records execution traces suitable for STARK proof generation via the FRI protocol. Same compiled bytecode, dual backends -- one for development and testing, one for proving. We're targeting the Winterfell library first, with the architecture designed for Plonky3 and Stwo swappability. No trusted setup. Post-quantum secure. Transparent proofs. Beyond that, the roadmap includes native field element arithmetic (`Felt` type), linear/affine types to prevent unconstrained witness bugs, an effect system for provable functional purity, STARK-to-SNARK wrapping for compact on-chain verification, dependent types for expressing constraint invariants, and ultimately self-hosting. Maat is early stage, not yet audited, and not production-ready. But the foundation is solid and the direction is clear. If you're working in zero-knowledge cryptography, formal verification, or language design -- or if you're simply a Rust developer curious about what provable computation looks like -- we'd love for you to take a look. Star the repo. Try the REPL. Execute custom programs/examples. Break things. Tell us what you think: https://lnkd.in/dyYGQ2gj

To view or add a comment, sign in

Explore content categories