Now in public beta -- v0.19.1

A safe, expressive
systems language

Advanced type safety with zero runtime cost
Close-to-Rust performance, with inline C for the last mile
Lisp-level expressiveness, with a non-Lispy dialect available
Install via curl -sSf https://turmeric-lang.com/install | sh
Or run via Docker -- docker build -t turmeric . && docker run --rm -it turmeric
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
Clojure Racket Haskell Koka Effekt

Capabilities

Advanced types,
no runtime performance hit

Lightning Compilation

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

sub-second builds
🎯
Typeclasses

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

Functor · Monad · Foldable
Algebraic Effects

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

defeffect · perform · handle
Pattern Matching

Exhaustive pattern matching on algebraic data types defined with defdata and generalized with defgadt. Every case is handled.

match · defdata · defgadt
Continuations

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

reset · shift · delimited
Macro System

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

defmacro · quasiquote

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. Choose what fits the problem -- not what the type system forces on you.

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"))

Write once,
handle anywhere

The same business logic powers your production app and your test suite. Swap the handler -- not the function. No mocking frameworks, no dependency injection.

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. No ceremony.

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"} })

Get Started

Up and running
in minutes.

01 -- Install
One-command install
curl -sSf https://turmeric-lang.com/install | sh

Installs tur via Homebrew on macOS. On Linux, grab a prebuilt binary from the releases page, build from source, or use the Docker image.

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 are annotated with :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.