v2.0.0

TurfLang 2.0 is a major release, and it changes the language: most 1.x programs need small edits before they compile. Start with the migration guide. It lists every change that…

Oct 14, 2026v2.0.0

v2.0.0

Full changelog from GitHub

Written on the GitHub release page. It lists every change that went into v2.0.0.

TurfLang 2.0 is a major release, and it changes the language: most 1.x programs need small edits before they compile. Start with the migration guide. It lists every change that affects existing code and the fix for each, and turf migrate pub --write makes the most common fix for you.

Highlights

  • Projects and packages. turf is now the tool you work with: turf new, run, build, check, test and fmt. A project is described by turf.toml, and its dependencies, local paths or git repositories, are pinned in turf.lock.
  • Visibility. Declarations are private to their module unless marked pub.
  • Safer by default. Signed integer overflow panics instead of wrapping. Out-of-range literals are compile errors. s[i] returns a bounds-checked char. Returning a reference to a local is a compile error. Raw pointers can only be used inside unsafe { } or an unsafe module;.
  • Self-contained installs. Each archive carries the compiler, its LLVM, a linker and the runtime, so nothing else needs installing to compile and run programs. On Windows that means no MSYS2 and no Visual Studio.
  • --smart diagnostics. In the -smart build, an error the compiler cannot fix by itself is passed to a small language model running on your own machine. A suggestion is shown only if it removes the error without adding another. You supply one .gguf model; none is shipped or downloaded.

Platforms

Linux x86-64, Linux arm64, Windows x86-64 and macOS arm64 (Apple Silicon). Each has two archives: the plain one, and a -smart one that adds the runtime for --smart. Linux needs glibc 2.34 or newer.

Install

Linux and macOS:

curl -fsSL https://raw.githubusercontent.com/turf-lang/turf-lang/master/scripts/install/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/turf-lang/turf-lang/master/scripts/install/install.ps1 | iex

For the smart build, run the saved script with --smart (or -Smart on Windows). Then check the install with turf version, which should print turf 1.0.0 and turfc 2.0.0.


What's Changed

Full Changelog: v1.0.0...v2.0.0

Esc

Type to search.