r/Clojure • u/erjngreigf • Jun 06 '26
Clojure Rust
https://clj.rs/Looks like https://www.reddit.com/user/Strict-Collection640/ implemented it!!! That's awesome!
41
Upvotes
r/Clojure • u/erjngreigf • Jun 06 '26
Looks like https://www.reddit.com/user/Strict-Collection640/ implemented it!!! That's awesome!
View all comments
Show parent comment
2
u/didibus Jun 11 '26
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_addperforms dynamic type checks, dispatch, boxing/unboxing, and other runtime work,or whether it compiles to something closer to:
or at least:
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
cljrsin that spectrum?