Now in public beta -- v0.71.0

A safe & expressive
systems language

Advanced type safety with zero runtime cost where possible
Close-to-Rust performance with inline C where needed
Lisp-level expressiveness with a non-Lispy dialect available
effects.tur
;; Algebraic effects in Turmeric (defeffect Ask [] : int) (defn use-ask [] : int (+ 1 (perform (Ask)))) (println (handle (use-ask) (Ask [] k) (resume k 41)))
Inspired by
Rust Clojure Racket Haskell Dafny

Capabilities

Advanced types,
little-to-no runtime performance hit

Lightning Compilation

Turmeric compiles to native code with whole-program optimization. Incremental builds are fast by design, meaning more time writing and less time waiting.

Typeclasses and ADTs

Ad-hoc polymorphism with zero-cost dispatch. Define interfaces, implement them for any type, and let the compiler verify everything.

Algebraic Effects

Model side effects as first-class values. Compose, intercept, and resume them with handlers -- no monad transformers required.

Pattern Matching

Exhaustive pattern matching on algebraic data types defined with defdata, whose constructors may declare their own result types. Every case is handled.

Continuations

Delimited continuations with reset and shift let you encode coroutines, generators, and advanced control flow as ordinary library code.

Macro System

A compile-time macro system with quasiquote and unquote. Extend the language with new syntax without sacrificing readability.


Zero-overhead polymorphism.

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.

typeclasses.tur
(defclass Show [a] (show [x] : cstr)) (defclass Eq [a] (eq? [x y] : bool)) (defdata Color (Red) (Green) (Blue)) (definstance Eq [int] (eq? [x y] (= x y))) ;; Typeclass constraint -- requires Show instance (defn display [^Show a x] : void (println (show x))) ;; Pattern match on ADTs (defn color-name [c] : cstr (match c (Red) "red" (Green) "green" (Blue) "blue"))

Let consumers handle effects
the way they want

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.

effects.tur
(defeffect Ask [] : int) ;; Business logic -- no mention of *how* Ask works (defn compute [x] : int (+ x (perform (Ask)))) ;; Production: supply real value (defn run-prod [program] : int (handle program (Ask [] k) (resume k 41))) ;; Test: supply fixed value -- no mocking frameworks (defn run-test [program] : int (handle program (Ask [] k) (resume k 0))) (println (run-prod (compute 1))) ;; => 42 (println (run-test (compute 1))) ;; => 1

One file to manage all your deps

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.

build.tur
(defpackage my-app :name "my-app" :version "0.1.0" ;; Turmeric dependencies -- called spices :spices { "geom" {:url "https://github.com/alice/tur-geom" :ref "v0.2.1"} "math" {:url "https://github.com/bob/tur-math" :ref "v1.5.0"} } ;; C/CMake dependencies (CPM-compatible) :cmake-deps { "raylib" {:url "https://github.com/raysan5/raylib" :ref "5.0"} })

Up and running
in minutes

01 -- Install
Pick your install
curl -sSf https://turmeric-lang.com/install | sh

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.

02 -- New Project
Scaffold a project
tur new my-project cd my-project tur run

Creates a project with sensible defaults, a package manifest, and a hello world entry point.

03 -- Write Code
Your first function
(defn factorial [n] : int (if (<= n 1) 1 (* n (factorial (- n 1))))) (println (factorial 10)) ;; => 3628800

Return types follow the parameter list -- : int, : bool, or : cstr. The compiler catches type errors before you run.

04 -- Add Packages
Rich package ecosystem
tur add spice/http tur add spice/json tur add spice/postgres

The Spice registry hosts packages for GUI, audio, HTTP, JSON, databases, parsing, and more.

Ready to add some
spice to your stack?

Try Turmeric in your browser. No install required.