Website · Download · Releases · Issues
Turf is a compiled language built on LLVM. It has structs, enums, real generics, state machines, pattern matching, error unions, and a garbage-collected heap with checked references. The standard library covers strings, collections, files, JSON, HTTP and sockets. A project and package tool and a language server ship with it.
Programs compile to a single native executable that needs no Turf files at run time. Releases are self-contained on Linux (x86-64, arm64), macOS (Apple Silicon) and Windows (x86-64): the archive carries the compiler, its LLVM, the linker and the runtime, so there is nothing else to install.
# Linux and macOS
curl -fsSL https://turflang.org/install.sh | sh# Windows (PowerShell)
irm https://turflang.org/install.ps1 | iexOr use a package manager:
brew install turf-lang/turf/turf # Homebrew
scoop bucket add turf https://github.com/turf-lang/scoop-turf
scoop install turf # ScoopThen:
turf new hello && cd hello
turf run| Repository | What it is |
|---|---|
| turf-lang | The compiler, standard library and language reference. Start here. |
| turf-cli | The turf command-line tool: projects, builds, tests, formatting and dependencies. |
| turf-lsp | The language server, which runs the real compiler in-process for diagnostics, hover and completion. |
| turf-skills | Skills that teach coding agents to write Turf. |
| turf-fuzz | Fuzzing for the compiler, with findings promoted to regression tests. |
| website | Source for turflang.org. |
| homebrew-turf | Homebrew tap. |
| scoop-turf | Scoop bucket for Windows. |
Bug reports, questions and pull requests are welcome. Report a compiler bug on
turf-lang and include the
output of turf version. Problems with the turf tool belong on
turf-cli, and editor problems
on turf-lsp. Each repository's
README says how to build and test it.