Big news for Clojure... I'm proud to announce Gloat! — #gloat https://gloathub.org/blog/2026/02/22/introducing-gloat-and-glojure/ https://github.com/gloathub/gloat is a multi-purpose CLI tool that fully automates https://github.com/glojurelang/glojure AOT operations. Compile Clojure code to Go code, binary executables, shared libraries, Wasm modules, Go build directories and more. Cross-compile to https://gloathub.org/getting-started/#supported-platforms. Shared library FFI bindings are working in https://github.com/gloathub/gloat/tree/main/demo/so-bindings. Did you know that Clojure now runs on the Go ecosystem?! With REPL and AOT support?! — #glojure While Gloat and Glojure are both still in early development, this promises to compete strongly with GraalVM for Clojure projects.
@asko304 your macOS issues should be fixed in v0.1.10
It got further now, but I think it has trouble creating directories it needs?
asko@mbp ~ % gloat test.clj
Converting directory /var/folders/dj/zgbbn75s1wz33c8g5sgq56kh0000gn/T/ec732293-1370-4bd4-96df-64eced3b0f2b347995320711662276 to /var/folders/dj/zgbbn75s1wz33c8g5sgq56kh0000gn/T/d3ea7a40-e3b6-4354-8a69-5a6a513e3b6a5200147016098861160/build
Found 1 source file(s)
Converting test.clj ...
Compiling main.core ...
glj compile failed for main.core:
Cannot run program "/Users/asko/.local/share/gloat/.cache/.local/bin/glj" (in directory "/var/folders/dj/zgbbn75s1wz33c8g5sgq56kh0000gn/T/fee9b2a6-3a2a-47bf-8565-cd0b187dddc914695968119918961804"): Exec failed, error: 2 (No such file or directory) asko@mbp ~ % gloat --version
gloat version 0.1.10
glojure version v0.6.5-rc6Happy to hop on a huddle with you to debug further if you want.
i suggest moving this diagnosis to a 1:1 or a github issue 😅
I don't seem to have a lot of luck on MacOs:
asko@mbp ~ % gloat test.clj
/Users/asko/.local/share/gloat/util/getopt: line 85: declare: -n: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/asko/.local/share/gloat/util/getopt: line 85: declare: -n: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/asko/.local/share/gloat/util/getopt: line 85: declare: -n: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
Missing input file
asko@mbp ~ % cat test.clj
(ns main.core)
(defn -main [& args]
(println "Hello, world!"))
Am using the demo hello-world app from your repo.Hey @asko304 🙂
This looks like a bash 3.2 bug and I can certainly fix it later tonight, but Here's a quick fix for you if you have homebrew installed: brew install bash
This will just put a newer bash in your path and Gloat will pick it up but it won't change your /bin/bash or your interactive shell at all.
In other words, it's totally safe to do and I imagine it will make gloat start working or at least not fail on that bug. 😄
Thanks for reporting it though. This will get hit over and over. I developed Gloat on Linux, but I have a local Mac mini to test on and I should get the the GitHub actions testing working in the next day or so.
Nice! > With REPL With it being as fully dynamic as it is in Clojure on the JVM?
Nearly so. Yes.
Try it out. 🙂
@jfhamlin could speak more accurately to the REPL (and everything Glojure). I've been focused on the AOT and making it trivial to use in projects.
@ingy Thx for sharing. Can I write a Terraform Provider with Gloat? https://search.opentofu.org/docs/providers/creating
I don't see why not. If you want to join #gloat I'd be happy to give you guidance.
I'm planning on applying this a lot in the Kubernetes space.
It's interpreted though? So it rivals more with babashka than Clojure no?
It's interpreted in the repl but also fully AOT compiling to go code which compiles to binary as you know.
I'm fairly certain anyway
It was an interpreted language last July when I found out about it. But then James added AOT over the following weeks. Clojure.core is certainly pure Go code now as are the other standard libraries. And it has compile time interop with any go libraries. But I'm not certain if there are any interpreted parts left. Looking into it now
Looks like it's hybrid.
Interesting, I'll have to check it out more.
@didibus Claude Code gave me this analysis: https://gist.github.com/ingydotnet/a9e65c896180e42e849a1a52c272d1e5
There's some really interesting games you can play with the compiled go code. This afternoon I implemented a flag that can eliminate all the parts of the clojure.core go code that are not used before final compilation. Reducing the binary size and thus decreasing the startup time.
I guess at the end of the day what matters is just performance and memory characteristics at startup and later at runtime.
Agreed and there's a lot of room for improvement but the fact that it's all plain code that you can see makes it easier to figure out how to do that...
congrats to @ingy on the Gloat launch! seriously impressive, and i'm grateful for the momentum he's brought to glojure over the last several months. glojure AOT compilation wouldn't have been built so quickly if it weren't for that re AOT, REPL, and dynamic features: • the claude analysis gets it right 🙂 • anything AOT-compiled is go code — go code that uses the glojure runtime, mind you, because that's required to implement glojure semantics — but the AOT codepaths aren't interpreted ◦ e.g. by default, the standard library is AOT-compiled, which gives the glj REPL quick startup speed • anything defined in the REPL or evaluated in a file without AOT-compilation will be interpreted as Ingy says, there's a lot of room for improvement. for instance, there are surely many optimization opportunities in both the generated Go and in the interpreter. i expect Gloat's already tackled some of these and that they'll make their way to mainline 🙂
First wave of optimization. Reduced binary size by 50% and runtime by 80%
https://gist.github.com/ingydotnet/cade2007efa7a4b36ca3afac7237f6cb
gloat -Xprune removes dead AOT code.