r/Clojure • • Jun 11 '19

GitHub - timothypratley/rustly: A Clojure to Rust transpiler

https://github.com/timothypratley/rustly
73 Upvotes

15 comments sorted by

View all comments

11

u/halgari Jun 11 '19

There's not a whole lot implemented, which makes it hard to know what the final design approach will be. What's not clear here is how much of Clojure will be usable via this approach. It should be possible to get a CLJS-like experience through simple transpilation. But it's yet to be seen how things like collections, equality, memory management, etc. will be handled. And traditionally Clojure leans really hard on optimizing JITs so it'll be interesting to see how this performs in a statically compiled context.

0

u/[deleted] Jun 11 '19

[deleted]

4

u/halgari Jun 11 '19

Sure, but that will result in really bad performance especially if multi-threaded support is required. None of this is impossible, but there is a reason it hasn't been done before.

2

u/therealdivs1210 Jun 12 '19

Apologies, I meant to reply to another comment.

I understand that it won't be as performant, but this is probably the easiest way out and thus there's a high chance of it happening. The Unity Game Engine has been using a 2008 Boehm GC (!!!) for a long time since that's what Mono was using at that time.

I stumbled upon some interesting stuff thanks to this post: