Skip to content

By PromptFission2 min read

Truss is a programming language that makes agents ship a proof with every package

Bret Taylor's prototype language assumes agents write the code and humans check it. Packages carry proofs that the compiler checks instead of trusting.


Most programming languages are designed to be pleasant for a person to type. Truss starts from the assumption that nobody will be typing. The README calls it a language for agent-written software, credits it to Bret Taylor, and describes it as “just a prototype” meant to start a conversation. Its central trade is simple to state: spend more tokens when the code is written, and get software whose behavior has been proved.

How it works

The unit of code is a package, and the heart of a package is a contract. A contract declares data structures and functions and then states what must be true of them. The README’s example, a function that replaces one element of a slice, has four kinds of clause:

  • requires: the index is less than the slice length.
  • ensures: the return value is the old element, and the slice is the old slice with that one position changed.
  • terminates: the function finishes.
  • effects: it may read and write the slice, and nothing else is declared.

A provider is an implementation of a contract. Two providers, say a hash map and a sorted map, can satisfy the same Map contract. Each ships a package.proof file next to its source as evidence that it conforms.

The division of labor is what makes this plausible at scale. Code that uses a contract relies on the contract’s claims. When a program binds a contract to a specific provider, the compiler checks the shipped proof, which the README says can be an order of magnitude faster than producing it. So the package author pays once, and by the README’s estimate pays roughly as many tokens for proofs as for code. Everyone downstream replays the proof.

The README also claims the guarantees survive compilation and linking: the compiler is meant to preserve a function’s observable behavior, and a truss verify command uses a separate verifier written in Rust to check the linked executable.

What the README leaves open

It does not name the proof system or solver. It asserts that the compiler preserves behavior without explaining how that is established. It has no benchmarks, and it does not say which agents or models wrote the code in the repo.

The standard library examples give a feel for the ambition. Each comes with a stated guarantee: a SHA-256 digest covers exactly the bytes accepted, however the input is chunked; a socket readiness event for a closed connection cannot be applied to a new connection that reuses its slot.

One commit from December 1 is titled “Bound proof search for multipart form parsing”, which suggests proof search is something that can run away.

Try it yourself

The repo is Apache-2.0 and installs from source, following its getting-started chapter. It includes an agent skill for package authors. The first commit is dated November 30.

We have not built or run it. This is based on the README and the commit log.