For those wondering how this is done, it involves: a new Clojure dialect and it's reader, core libs and a compiler.
The reader reads the specific tokens that define the Clojure Dart dialect via the data readers extension mechanism of the standard Clojure reader. Note, this dialect is not strictly compatible with other Clojure dialects, only with Clojure code that is host platform neutral 'pure Clojure', or code that uses dialect 'reader conditionals' to have specialised functionality. This is as it is with Clojurescript, and libraries made cljs friendly will not doubt be trivially made cljd friendly.
The core libs is where the bulk of the work lies, by lines of code at least. core.cljd is 7135 lines, with all the Java-isms (mainly IO, String and Math fns) replaced by Dart wrapper libs. A lot of it, however, is pure Clojure lifted straight from the original. Furthermore, there's a ready-made test suite.
Finally, the compiler. 4000 lines to produce Dart source from AST generated by the standard Clojure reader (but with Dart extensions support via tagged data).
The reader reads the specific tokens that define the Clojure Dart dialect via the data readers extension mechanism of the standard Clojure reader. Note, this dialect is not strictly compatible with other Clojure dialects, only with Clojure code that is host platform neutral 'pure Clojure', or code that uses dialect 'reader conditionals' to have specialised functionality. This is as it is with Clojurescript, and libraries made cljs friendly will not doubt be trivially made cljd friendly.
The core libs is where the bulk of the work lies, by lines of code at least. core.cljd is 7135 lines, with all the Java-isms (mainly IO, String and Math fns) replaced by Dart wrapper libs. A lot of it, however, is pure Clojure lifted straight from the original. Furthermore, there's a ready-made test suite.
Finally, the compiler. 4000 lines to produce Dart source from AST generated by the standard Clojure reader (but with Dart extensions support via tagged data).