Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clojurescript self compilation for node

I've been following along the clojurescript self compilation news, including most recently http://www.yogthos.net/posts/2015-11-12-ClojureScript-Eval.html

Would a similar approach work with nodejs as a target? Although the bootstrapped REPL is very cool, I'm interested in compiling (or otherwise making executable) cljs files with node. I'm hoping this would make writing and running clojure(script) scripts on old / embedded hardware a less painful experience in terms of JVM startup time and memory consumption. Is this a reasonable hope? How would I go about producing such an executable from cljs source? Thank you for your input.

like image 434
calopter Avatar asked Nov 26 '25 21:11

calopter


1 Answers

Check out https://github.com/kanaka/cljs-bootstrap

This can easily be installed via npm install -g cljs-repl. After doing that you can run a *.cljs file via cljs foo.cljs.

like image 129
Mike Fikes Avatar answered Nov 29 '25 14:11

Mike Fikes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!