# Bend 2 — a language that makes an AI prove its code obeys your laws

> Declare the rules your program must never break, and Bend 2 refuses to compile an edit that cannot prove it kept them.

- Org: Bend
- Date: 2026-09-17
- Category: tool, repo
- Source: https://bend-lang.com/
- Canonical page: https://ai-tldr.dev/releases/bendlang-bend-2/

## In short

Bend 2 went public on 17 September 2026. You write rules in a LAWS.bend file and the compiler rejects any edit it cannot prove keeps them, which is aimed at AI-written code. It compiles to C, Metal, CUDA and JavaScript.

## What it is

A file called LAWS.bend is the new idea in Bend 2, which became publicly available on 17 September 2026. In it you state properties the program must always satisfy — a balance is conserved, two objects never overlap, a sort really sorts — and the compiler treats them as theorems it has to re-prove after every change. The language itself is Apache-2.0, has Python-like syntax with dependent types, and compiles to C, Metal, CUDA and JavaScript.

## How it works

The type checker doubles as a proof checker. When code changes, Bend demands a mechanical proof that every declared law still holds, and it will not produce a binary otherwise; the documented workflow is to run `bend PROOF.bend` before committing. Parallelism comes from divide-and-conquer structure rather than explicit threads, so the same program spreads across cores or a GPU without thread code.

## Why it matters

The usual complaint about AI-written code is that it looks right and quietly breaks an invariant somewhere else. Laws turn that review problem into a compile error, which is a different kind of guarantee than a linter or a test suite. The catch is stated in Bend's own repository: the compiler is 99% AI-written and not yet fully audited, and the language has no type inference, no macros and no Windows build.

## Who it's for

developers who want AI edits gated by proofs

## Try it

curl -fsSL https://bend-lang.com/install.sh | sh

## Quick facts

- Version: Bend 2
- Released: 17 September 2026
- License: Apache-2.0
- GitHub stars: 20,183
- Compile targets: C, Metal, CUDA, JavaScript
- Syntax: Python-like, with dependent types
- Platforms: macOS and Linux (no Windows)

## FAQ

### Is Bend 2 free to use?

Bend 2 is Apache-2.0 licensed and developed in the open at github.com/bendlang/bend, so it is free for commercial and personal work. Installation is a single shell command from bend-lang.com, and the repository ships the compiler, the guide and the proof checker together rather than splitting a paid tier out of the toolchain.

### Do Bend 1 programs still run on Bend 2?

No. The Bend project states that Bend 1 programs do not carry forward to Bend 2, so existing code has to be rewritten rather than migrated. Bend 1 was a massively parallel functional language; Bend 2 keeps the parallel execution story but rebuilds the language around dependent types and checked program laws, which is why compatibility was dropped.

### What can Bend 2 not do yet?

The Bend 2 repository lists its own limits plainly: no type inference, no macros, no separate compilation, no multi-machine execution, no Windows support, and only three numeric types — Nat, U32 and F32. Native compilation is also described as slow. These are documented gaps rather than bugs, so early users should expect to write more type annotations than usual.

### How much of the Bend 2 compiler was written by AI?

The Bend repository says the compiler is 99% AI-written and has not been fully audited yet. That is an unusual disclosure for a tool whose selling point is mechanical trust, and it is the main caveat for anyone considering Bend 2 for safety-relevant code: the proof checker's own implementation has not had the human review that its output is meant to replace.

### How fast is Bend 2 at checking proofs?

Bend's project page claims its proof checker beats other proof assistants by several orders of magnitude, verifying proofs in under a second where competing tools take minutes. Those are the project's own published figures rather than independent measurements, and the repository also claims C-level speed on CPUs and CUDA-level throughput on GPUs for ordinary programs.

## Links

- [Install & Guide](https://bend-lang.com/)
- [GitHub Repo](https://github.com/bendlang/bend)
- [Release Status](https://bend2.dev/)
- [HN Discussion](https://news.ycombinator.com/item?id=49746163)
