Now in public beta -- v0.71.0
Capabilities
Turmeric compiles to native code with whole-program optimization. Incremental builds are fast by design, meaning more time writing and less time waiting.
Ad-hoc polymorphism with zero-cost dispatch. Define interfaces, implement them for any type, and let the compiler verify everything.
Model side effects as first-class values. Compose, intercept, and resume them with handlers -- no monad transformers required.
Exhaustive pattern matching on algebraic data types defined with defdata, whose constructors may declare their own result types. Every case is handled.
Delimited continuations with reset and shift let you encode coroutines, generators, and advanced control flow as ordinary library code.
A compile-time macro system with quasiquote and unquote. Extend the language with new syntax without sacrificing readability.
Typeclasses
Attach new behavior to any type without touching it. Turmeric resolves typeclass dispatch at compile time -- no virtual tables, no runtime cost.
From typeclasses and HKTs to runtime contract types, Turmeric offers multiple forms of polymorphism.
Effect Handlers
The same business logic powers your production app and your test suite. Swap the handler to use effectful code in a different context.
Turmeric's algebraic effect system makes this possible: declare what a function can do, not how it does it. The type system ensures every effect is handled.
Package Manager
One build.tur declares your package and its dependencies. Reference any spice by Git URL -- no registry account, no separate tooling. Third-party spices import just like your own modules.
Most spices are pure Turmeric or inline C -- nothing to install. When you need a native C library, add it to :cmake-deps and Turmeric handles fetching, building, and linking automatically. Many popular libraries already have Turmeric spices -- like tur/raylib -- so you may not need it at all.
macOS and Linux. Installs the version manager (tvm) and then the latest release, whose tarball is checked against that release’s sha256sums.txt before it is unpacked — and the install stops rather than continuing if that check cannot be made.
Release assets also carry build provenance, so you can confirm which workflow run produced the bytes you have.
On a platform with no prebuilt binary it builds the same release tag from source instead.
Afterwards, tvm install and tvm use switch between releases per-shell.
The Dockerfile builds the compiler and stdlib inside the image and drops you at a REPL -- no toolchain on your host.
Or open a Codespace in the browser -- a cloud dev container with the toolchain already built, so there is nothing to install locally.
Want to track main instead? This builds the current main and verifies no checksum — useful for following development, not for an ordinary install.
Creates a project with sensible defaults, a package manifest, and a hello world entry point.
Return types follow the parameter list -- : int, : bool, or : cstr. The compiler catches type errors before you run.
The Spice registry hosts packages for GUI, audio, HTTP, JSON, databases, parsing, and more.
Try Turmeric in your browser. No install required.