Skip to content

ClojureStar

Toward Truly Portable Clojure Libraries

Now that we have a growing number of Clojure dialects being actively developed, it's a good time to think about what it would take to formalize a portable Clojure layer that library authors can safely target. The ideal would be to have write-once, run-anywhere libraries that would work unmodified on JVM Clojure, ClojureScript, Babashka, Jolt, Glojure, let-go, Gobb, and any other dialect that implements Clojure semantics faithfully.

Today, the primary tool we have for that is .cljc reader conditionals, and it's easy to see why it's not the right solution. Reader conditionals become a maintenance nightmare the moment you go beyond having a couple of platforms. They push the burden of understanding internal semantics of every new dialect onto library authors, and require libraries to be updated for each new dialect.

Introducing Gobb: Go + bb

TL;DR Gobb

I became a Clojure programmer 3 years ago for very specific reasons. I lead maintenance of the YAML data language, and I wanted to expand the YAML ecosystem, including making a YAML based programming language. Clojure had the right stuff to make this happen.

The combination that made this possible was GraalVM's native-image compiler and Babashka's SCI runtime. Together they gave me a way to write YAMLScript in Clojure and still ship it as native binaries and shared libraries. Those shared libraries now sit behind YAMLScript binding libraries for 32 programming languages.

That was the reason I started writing Clojure, and it is still the main reason I write Clojure today.

Introducing Grenadine

Most Clojure dialects eventually run into the same problem: the libraries they want to use are published to Maven repositories, but the machinery for finding and installing those libraries usually assumes a JVM. Every dialect is left to solve POM parsing, transitive dependencies, version conflicts, downloads and source loading for itself.

Grenadine is a new portable Maven dependency resolver written in pure Clojure. Its goal is simple: give Clojure dialects one resolver they can share instead of asking every implementation to rebuild the Maven dependency stack. It is also a native, Java-free command for directly managing an M2 repository.

Welcome to ClojureStar

ClojureStar is a place to discover, promote and compare the many dialects in the Clojure family. It brings their projects together in one catalog and gives people practical ways to try them for themselves.