Open djwhitt opened 6 years ago
Is DataScript currently impossible to run outside of a browser or just difficult?
I'm pretty sure it'll run outside the browser. I know that it at least loads. However, it won't compile in self-hosted ClojureScript. You have to use JVM Clojure to compile it.
I suspect the main problem is macro definitions in :clj blocks. They don't get evaluated in self-hosted ClojureScript.
I should probably elaborate a bit on why I want to run on Lumo. One reason is the AI vs AI runner. It would be great to be able to run that from a script without any JVM dependency. The other is as a unit and integration test runner. Both of those are cases where I feel like having an explicit compilation phase that relies on the JVM gets in the way more than it helps.
I've made some progress on this here: https://github.com/Zetawar/datascript/tree/self-hosted-cljs
That might be enough to get the game logic running if some other self-hosted-cljs incompatible dependencies are removed. I'll probably tackle logging next.
Ok, so this isn't exactly a Zetawar issue, but this keeps us from being able to run Zetawar on Lumo, and I really really want to run Zetawar on Lumo. :grin: