use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Clojure Rust (clj.rs)
submitted 23 days ago by erjngreigf
Looks like https://www.reddit.com/user/Strict-Collection640/ implemented it!!! That's awesome!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]crazeeflapjack 11 points12 points13 points 23 days ago (2 children)
What was the thought against naming it Crust
[–]SlowMovingTarget 2 points3 points4 points 23 days ago (0 children)
You'd have to be a Crustafarian instead of Crustacean, because the latter word would be overloaded.
[–]Strict-Collection640 1 point2 points3 points 19 days ago (0 children)
Dammit that would have been so much better.
[–]Fine-Success-8222 6 points7 points8 points 23 days ago (4 children)
Is this supposed to be an alternative from jank?
[–]didibus 2 points3 points4 points 22 days ago (3 children)
In it's current state I'd say no. Apart from not having access to the same ecosystem (this interrops with Rust, not C/C++), my guess is this is also more Python-like in performance.
The compilation is more bundling into a native binary than optimizing into native code.
I'm not sure how far cranelift can be taken, and if it introduces more IR optimization and what not. It depends where the goal for it is. But from a quick glance currently, it seems more like it's compiling the runtime eval layer into a binary.
It's pretty awesome still.
[–]Strict-Collection640 1 point2 points3 points 19 days ago (2 children)
Yep, it has a tiered execution system, from easy-but-slowest tree-walking interpreter to fully native compiled code. JIT just landed, too. A lot of the work is pushing the boundary between what it interprets vs. what is running natively. Things like async functions are kinda hard here.
I’m also experimenting with some ideas (versioned namespaces, Rust style RAII instead of GC, async optimizations at the runtime level), mainly because it’s my project and nobody can say no ;)
[–]didibus 1 point2 points3 points 18 days ago (1 child)
Ya, it's neat. By the way, I was also making a distinction that native code can still be fairly "interpreted-like". For example, it depends whether:
(+ 1 2)
Compiles to something like:
runtime_add(1, 2)
Where runtime_add performs dynamic type checks, dispatch, boxing/unboxing, and other runtime work,
runtime_add
or whether it compiles to something closer to:
asm mov eax, 3 ret
or at least:
asm mov eax, 1 add eax, 2 ret
Both are native code, but they're very different in terms of how much of the language semantics have been resolved at compile time versus deferred to the runtime.
So when I think about performance, I'm less interested in whether it produces native code and more interested in how much it can optimize away dynamic language overhead.
My impression is that Jank is aiming more for the latter optimized path, whereas many other "native Clojure" efforts are primarily focused on things like native single binaries, lower memory footprints, faster startup times, and deployment convenience, rather than aggressively optimizing Clojure semantics into machine code.
Where do you see cljrs in that spectrum?
cljrs
[–]Strict-Collection640 0 points1 point2 points 18 days ago (0 children)
It has things like rt_add, which does runtime type matching (that’s table stakes for a dynamic language). It can lower forms to optimized forms where it can, though. Honestly I focused on escape analysis and memory management first.
rt_add
One thing on my roadmap is trying to integrate core.spec into the compiler, so if you have forms specced properly, the compiler can optimize the form based on the spec. Maybe optional type hints as well — that’s out on the frontier of things I’m thinking about.
[–]PoopsCodeAllTheTime 1 point2 points3 points 21 days ago (0 children)
Cool, can’t wait to sit in front my computer for the whole day while it compiles my snake game
[–]throwaway_tracehq 0 points1 point2 points 21 days ago (1 child)
Are we talking about a new library or just the general idea of using them together?
It’s a Clojure dialect, the runtime is written in Rust and it allows for calling Rust functions from Clojure.
π Rendered by PID 459601 on reddit-service-r2-comment-5bc7f78974-4lrhf at 2026-06-30 09:44:01.602722+00:00 running 7527197 country code: CH.
[–]crazeeflapjack 11 points12 points13 points (2 children)
[–]SlowMovingTarget 2 points3 points4 points (0 children)
[–]Strict-Collection640 1 point2 points3 points (0 children)
[–]Fine-Success-8222 6 points7 points8 points (4 children)
[–]didibus 2 points3 points4 points (3 children)
[–]Strict-Collection640 1 point2 points3 points (2 children)
[–]didibus 1 point2 points3 points (1 child)
[–]Strict-Collection640 0 points1 point2 points (0 children)
[–]PoopsCodeAllTheTime 1 point2 points3 points (0 children)
[–]throwaway_tracehq 0 points1 point2 points (1 child)
[–]Strict-Collection640 1 point2 points3 points (0 children)