Library / SDK
clojure/clojure avatar
clojure/clojure

clojure/clojure: The Official Compiler Source for the Clojure Language

The Clojure programming language

10,961 stars1,523 forksJavaLicense varies

At a glance

What is it?
The clojure/clojure repository is the authoritative source for the Clojure compiler, a JVM-hosted Lisp dialect authored by Rich Hickey, built with Maven and licensed under the Eclipse Public License 1.0.
Who is it for?
The clojure/clojure repository is the right starting point for anyone who wants to study how Clojure is compiled, contribute a patch, or build a custom compiler variant. It is not a learning resource for developers new to the language; those readers should go to clojure.org/guides/getting_started or the official documentation at clojure.org.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What This Repository Is and Who Should Clone It

The clojure/clojure repository contains the source code for the Clojure compiler itself, not the standard library documentation, not beginner tutorials, and not a package index. It is the codebase that Rich Hickey and the Clojure core team maintain to produce the official compiler artifacts. The primary language in the repository is Java: the Clojure compiler is implemented in Java and generates JVM bytecode. Clojure source files live in src/clj/ while the Java compiler infrastructure lives in src/jvm/. A developer working on a Clojure application has no reason to clone this repository; they consume Clojure through a build tool such as Leiningen or the Clojure CLI. The audience for this repository is people contributing to the compiler, building tools that need to understand Clojure's compilation model, or studying how a Lisp is mapped onto the JVM.

How Clojure Compiles to JVM Bytecode

Clojure compiles to JVM bytecode at runtime by default, using a just-in-time approach: each namespace is compiled when it is first required. The compiler uses the ASM bytecode engineering library to generate class files directly, without generating Java source code as an intermediate step. The ASM library is bundled in the repository under a BSD-style license, as documented in the readme.txt. The compiler also uses a Murmur3 hash implementation taken from Google Guava, distributed under the Apache License 2.0. These dependencies are vendored rather than resolved through Maven at build time, which means the compiler can be built without network access to a Maven repository once the pom.xml dependencies are satisfied. The codegen/ directory contains code generation utilities that support this bytecode output path.

Building Clojure from Source with Maven

The repository is built with Maven. The readme.txt documents the standard build targets:

bash
mvn test

Runs the test suite. To build and package the JARs into target/:

bash
mvn package

To skip tests during the build:

bash
mvn package -Dmaven.test.skip=true

To install the built artifact into the local Maven repository:

bash
mvn install

To produce a standalone JAR with all dependencies included:

bash
mvn -Plocal -Dmaven.test.skip=true package

The standalone JAR can then be run directly:

bash
java -jar clojure.jar

This invocation starts an interactive REPL. The pom.xml controls versioning and dependency resolution. These steps build the compiler from source; they are not the recommended way to install Clojure for application development, which is covered at clojure.org/guides/getting_started.

Repository Layout and What Each Directory Contains

The top-level entries in the repository are: src/ (the Clojure and Java source files for the compiler), test/ (the test suite), codegen/ (code generation utilities), doc/ (internal documentation for contributors), build.xml (an Ant build file, retained alongside the pom.xml), and changes.md (the changelog). There is no separate folder for the standard library; the core library (clojure.core, clojure.string, and similar namespaces) ships inside the src/ directory alongside the compiler. The .github/ directory contains CI configuration. There are no GitHub releases in this repository; the README directs users to https://clojure.org for documentation and to https://ask.clojure.org for questions and feedback.

Where This Repository Falls Short as a Learning Resource

The readme.txt provides no explanation of the Clojure language, no tutorial, and no discussion of design decisions. It is nearly entirely the EPL-1.0 and Apache-2.0 license texts required for the bundled dependencies. The official documentation at clojure.org and the interactive guide at clojure.org/guides/getting_started serve the learning use case. The repository has no GitHub releases, which means tracking what changed between versions requires reading changes.md manually rather than browsing a release page. Contributors must read CONTRIBUTING.md and agree to a contributor license agreement before submitting patches; the README points to https://clojure.org for the contribution process. There are no instructions in the repository for setting up a development environment beyond the Maven build commands.

Clojure vs. Other JVM Languages for the Same Problem Space

Clojure occupies a specific position on the JVM: it is a dynamically typed Lisp with persistent immutable data structures and software transactional memory, designed for programs where concurrency and data transformation are central. The most direct comparison on the JVM is Scala, which targets a similar audience of engineers who want more expressive types than Java. The key difference is that Scala adds static types and an object-oriented layer on top of functional programming, while Clojure removes the type declarations and the mutable-by-default convention entirely, prioritizing interactive REPL-driven development and data-oriented programming. Clojure interoperates with Java directly: you can call any Java library from Clojure and call Clojure from Java. This interoperability is a design goal, not an afterthought, and the compiler is implemented in Java precisely to support it from the ground up.

Eclipse Public License and Maintenance Status

Clojure is licensed under the Eclipse Public License 1.0, whose text is included in the file epl-v10.html at the root of the repository. EPL-1.0 is a weak copyleft license: modifications to EPL-licensed files must be released under EPL-1.0 if distributed, but code that merely uses Clojure as a dependency is not affected. This is a different condition from MIT or Apache-2.0, which have no copyleft requirements. For teams distributing a modified compiler, EPL-1.0 requires the source of the modifications to be made available. The last push to the repository was on 2026-09-26. The repository has no GitHub releases; version artifacts are distributed through Maven Central and Clojars under the org.clojure group ID.

Editorial conclusion

The clojure/clojure repository is the right starting point for anyone who wants to study how Clojure is compiled, contribute a patch, or build a custom compiler variant. It is not a learning resource for developers new to the language; those readers should go to clojure.org/guides/getting_started or the official documentation at clojure.org. The Eclipse Public License 1.0 is compatible with commercial use but has copyleft terms that differ from Apache-2.0 or MIT; verify with your legal team before distributing a modified compiler. The last push was on 2026-09-26, and the repository has no GitHub releases, so version history is tracked through Maven artifacts published to Clojars and Maven Central.

Frequently asked questions

What is the Clojure programming language used for?

The clojure.org homepage linked in the repository describes Clojure as a hosted language designed for concurrent programming, data transformation, and interactive REPL-driven development on the JVM. The README itself does not enumerate use cases; it points to https://clojure.org for documentation.

What is Clojure based on?

Clojure is a Lisp dialect that runs on the Java Virtual Machine. The compiler source in this repository is written in Java and uses the ASM bytecode library to generate JVM class files directly from Clojure source code.

How do I install Clojure?

The README directs new users to https://clojure.org/guides/getting_started for installation instructions. Building from source requires Maven; the packaged JAR can be run with java -jar clojure.jar to start a REPL. This source build is for compiler contributors, not typical Clojure application development.

What is Clojure?

Clojure is an open-source Lisp dialect hosted on the JVM, authored by Rich Hickey and licensed under the Eclipse Public License 1.0. The clojure/clojure repository is the official compiler source; application developers use it indirectly through build tools such as Leiningen or the Clojure CLI.

Official sources

  1. clojure/clojure on GitHub
  2. Issues
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/clojure-clojure.svg)](https://hysenlabs.com/projects/clojure-clojure)