fwbrasil / zoot

Thin reactive framework to provide and consume REST services
GNU Lesser General Public License v2.1
48 stars 5 forks source link

Support for scala-js #2

Open hrj opened 9 years ago

hrj commented 9 years ago

Quoting the readme:

Is zoot compatible with Scala.js? No, since it uses runtime proxy generation. It is possible to remove this limitation using macros.

hrj commented 9 years ago

As a quick fix, would it be possible to emit Scala code as a text file? The file can then be included into a scala.js project.

Something like:

val codeGenerator = ScalaCodeGenerator[SomeAPI]("packageName", "className")
codeGenerator.write("fileName.scala")

I suppose this will be easier than writing a macro.

fwbrasil commented 9 years ago

Interesting, it is possible as well. I personally don't like generated source files so would prefer to have a macro even if it is more complex.