Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Kalai

github.com

  • Free plan
  • Self-hosted
6.6 Club score Visit github.com

What Kalai is

Kalai is a free, open-source source-to-source transpiler that converts Clojure code into other programming languages. Its purpose is to let developers encode algorithms once and make them available natively in multiple targets. The README lists Rust and Java and also refers to C++ as target languages. Kalai supports a subset of Clojure without adding new syntax. Namespaces map to classes, functions to static functions, defs and lets to variables, and atoms to mutable data structures. Only defn and def are accepted as top-level forms; executable forms such as println are rejected. Running Kalai requires the Clojure command-line tool with source and output directories. Examples use Make, Gradle for Java output, and Rustup for Rust output. The project rationale mentions compiling libraries such as SQL builders, internationalization algorithms, and data-diffing tools for multiple languages. This cross-language approach gives up the REPL and interactive development style. Kalai is self-hosted, offers CLI access but no API access, and is licensed under the Eclipse Public License 2.0, with a possible secondary Unicode License under stated conditions.

Who it suits

Kalai suits developers who want to translate a supported subset of Clojure into languages such as Rust, Java, or C++. It is intended for cross-language library work rather than REPL-centered interactive development.

Good to know, and what to watch

  • Open-source and free
  • Supports source-to-source conversion
  • Rust and Java targets listed
  • CLI access available
  • No added Clojure syntax
  • Only a subset of Clojure is supported
  • Top-level executable forms are rejected
  • Requires the Clojure CLI tool
  • No API access

Kalai

Free

Open source

The verdict

Kalai provides a focused way to generate code for multiple target languages from Clojure. Its constraints around syntax, top-level forms, and interactive development should be considered before adopting it.

What the maker publishes

Code mappings
Namespaces translate to classes, functions to static functions, defs and lets to variables, and atoms to mutable data structures. source
Contributor support
The project README welcomes pull requests and links to contribution guidance. source
Cross-language libraries
The rationale describes compiling libraries such as SQL builders, internationalization algorithms, and data diffing to multiple languages. source
Example toolchain
The examples use Make, Gradle for Java output, and Rustup for Rust output. source
How to run
The README shows invoking Kalai through the Clojure command-line tool with source and output directories. source
License
The source code is offered under the Eclipse Public License 2.0, with a possible Unicode License secondary license under the stated conditions. source
Maker
The repository identifies its maintainer organization as kalai-transpiler and credits the work to the Kalai Authors. source
Prerequisite
Running Kalai requires the Clojure command-line tool. source
Purpose
The project aims to let developers encode useful algorithms once and make them available natively in other target languages. source
Supported Clojure subset
Kalai supports a subset of Clojure constructs and does not add new syntax to Clojure. source
Target languages
The README lists Rust and Java as target languages and also refers to C++ among its targets. source
Top-level forms
Kalai rejects top-level forms other than defn and def, including executable forms such as println. source
Tradeoff
The project rationale says Kalai gives up REPL and interactive development style to gain cross-language and cross-platform reach. source
What it does
Kalai is a source-to-source transpiler that converts Clojure code into other programming languages. source

Checked against the maker's pages on 8 Oct 2026.