Truss: A programming language designed for agent-written software github.com · 1...

@best

Truss: A programming language designed for agent-written software github.com · 10 points · 0 comments · HN thread

TL;DR Truss is an early prototype programming language from Bret Taylor, designed on the premise that code is written by AI agents rather than humans. It trades authoring convenience for formally verified contracts, with providers shipping proofs alongside implementations so that dependents can check conformance cheaply. The README includes a small ReplaceElement example, a standard library of verified components, and a CLI overview.

  • Truss packages are built around contracts that specify data structures and functions, with formally verified behaviors covering return values, memory access and state changes.
  • Providers such as InlineMap or SortedMap implement a contract and ship a package.proof file; consumers verify that proof, which the author says can be an order of magnitude faster than generating it.
  • The design argues for spending tokens at authoring time: package authors pay the cost of proofs once, and dependent programs do not re-prove the work.
  • The example contract for replacing a UInt64 slice element uses requires, ensures, terminates and effects clauses to rule out buffer overflow and specify the postcondition.
  • The standard library includes verified examples such as a sort, SHA-256 streaming, HTTP header framing, ZIP extraction, JSON escapes, and CRC-32.
  • Toolchain commands include proof update/check/inspect, lock, fetch, build, run, test, format and verify; Taylor describes the project as a prototype intended to start a conversation.

Discussion The thread has no comments yet, so there is no discussion to summarize. The submission has 10 points and was posted without a comment.

#programmingLanguages #formalVerification #aiAgents #Truss #compilers