Find your next open-source project

Search by name, purpose, or keyword, or paste a GitHub URL. Start with / to search agent skills (e.g. /pdf)

finiteloop/truss

Developer ToolsLanguages

A formally verified programming language prototype designed for AI agents to write provably correct software.

This project ships 1 agent skillsSkill list and install →
442
32
Rust
Apache-2.0
1 day old
+184 stars in 24h

What Truss Is

Truss is a programming language prototype optimized for software written by AI agents rather than humans. Its design tradeoff is deliberate: instead of minimizing authoring effort, it spends reasoning and tokens at authoring time to make programs easier for humans to verify and more reliable at runtime. Where Rust adds compile-time memory safety, Truss extends formal verification to behaviors beyond memory management.

The core unit is a contract, which declares data structures and functions together with formally verified behavior: return values, accessible memory, and state changes. Providers implement contracts and must provably satisfy every claim, shipping a proof file next to the implementation source. Calling code relies on the contract's claims; binding a contract to a specific provider triggers independent validation of the supplied proof. The compiler also proves that code generation preserves observable behavior, keeping guarantees valid across separate compilation and linking.

Quick Start

  1. Install the compiler from source following the getting-started guide. Compiler development uses the separate toolchain build instructions.
  2. Write a contract in a .truss file, for example a ReplaceElement contract with preconditions, postconditions, termination and effects.
  3. Write a provider implementing it, then generate the conformance proof from the provider directory:
truss proof update

This emits package.proof alongside the implementation. 4. In a consuming package, declare the dependency and bind it to the provider using requires and bind, then proceed through lock, fetch --locked, check, build and run.

The getting-started chapter has an end-to-end first program. The compiler's commands cover locking, fetching pinned dependencies, generating/checking/inspecting proofs, source-level checks, building, running, testing, formatting and independently verifying linked code in self-hosted builds.

Examples and Documentation

The bundled standard library shows what contracts can guarantee in practice: sorting with stable payloads, streaming SHA-256 digests, HTTP header framing across split reads, ZIP extraction failure accounting, JSON escape decoding, socket readiness, streaming CRC-32, and owned byte buffers (standard library overview). Further reading: the language guide and compiler design notes.

Constraints

Truss is explicitly a prototype, not a production-ready language. Authoring packages requires installing and building the compiler from source, and verification is pushed to package authors, who spend comparable effort generating proofs as writing code. Formal verification currently targets the included contract and provider model; Rust is the implementation language of the toolchain. Licensing is Apache-2.0.

HotRepo's take

This is a single-snapshot newcomer: it appeared on the Rust new-project board on 2026-11-30 with 103 stars gained in about 12 hours and 8 forks, and has no recorded all-language daily rank yet. That is too little time-series data to call a trend. What stands out technically is the contract/provider/proof split, which makes formal verification scale by letting callers trust published evidence instead of re-proving each implementation — a concrete design idea worth watching, even while the project describes itself as a conversation starter.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

Hacker News

Bret Taylor designs Truss, a programming language for agents
▲ 2 · 1 comment · December 1, 2026

You might also like

  1. golang/goA statically typed, garbage-collected language built for simple, reliable, efficient backend and infrastructure software.Go139,508
  2. python/cpythonThe reference implementation of the Python language, aimed at developers who want to build, test, or contribute to Python itself.Python77,768
  3. aardappel/gooseA memory-safe systems language with no heap, GC or lifetime annotations, compiling to C.C++2,570
  4. earendil-works/djsA small no_std Rust JS/TS engine for wasm, designed to run model-written tool scripts with snapshots and resumability.Rust109
  5. argotorg/solidityA compiler and language for writing smart contracts that run on the Ethereum Virtual Machine.C++25,761