r/Clojure • • Apr 23 '20

ClojureRS - a Clojure implementation in Rust

https://github.com/Tko1/ClojureRS
15 Upvotes

4 comments sorted by

5

u/---cameron Apr 23 '20 edited Apr 23 '20

Oh hey, I appreciate the crosspost and all, I just want to mention that that post is actually itself a repost from here a day ago

https://www.reddit.com/r/Clojure/comments/g5h3oe/clojurers_clojure_implemented_atop_rust/

2

u/fijt Apr 23 '20

Hi, great idea! Do you also have suggestions about how to implement existing frameworks such as a GUI? How can I start using one, do you also have examples?

And what are the benefits of using ClojureRS instead of Ferret?

2

u/---cameron Apr 23 '20

Hey there, the project is really early and not meant to be used yet -- I'm still building its core now. I originally was not going to post it here until likely after that, but someone discovered it on github pretty quickly!

You would have to have to write wrapper code in Rust yourself, which would basically look like, say,

struct PrimitiveHardcodedFunction {
}
impl IFn for PrimitiveHardcodedFunction {
   fn invoke(&self,args: Vec<&Value>) -> Value {
      .. unwrap arguments 
      .. do things with them
      .. wrap return value as Value 
   }
} 

but again, without a real clojure.core, you'd be wrapping its primitives too, as I am now.

2

u/fijt Apr 23 '20

Okay. I see. I think that I stick with Parrot because it's more mature. Thanks for the reply.