Skip to content
Tech News
← Back to articles

Clojure Hosted on Go

read original more articles
Why This Matters

Glojure introduces a new way for developers to run Clojure code within the Go ecosystem, enabling easier integration of Clojure's expressive capabilities with Go's performance and libraries. Although still in early development, it offers a promising foundation for hobbyists and developers seeking interoperability between the two languages, potentially influencing future language tooling and hybrid application development.

Key Takeaways

Glojure

Try it in your browser!

Gopher image derived from @egonelbre, licensed under Creative Commons 1.0 Attributions license.

Glojure is an interpreter for Clojure, hosted on Go. Glojure provides easy access to Go libraries, similar to how Clojure provides easy access to Java frameworks.

Glojure is in early development; expect bugs, missing features, and limited performance. Backwards compatibility is not guaranteed until a v1 release. That said, it is used successfully in hobby projects and runs a significant subset of the (transformed) core Clojure library.

Note that unlike most other Go implementations of Clojure, Glojure is a "hosted" language - a term used to describe languages that are implemented in terms of a host language (in this case, Go). This means that all Go values can be used as Glojure values and vice versa.

Prerequisites

Before you get started with Glojure, make sure you have installed and have knowledge of Go (version 1.19 or higher).

Installation

Glojure is currently available from source for all platforms where Go can run, and it requires at least go 1.24.

... continue reading