Experience with the Scala.js ecosystem suggests that it is very well suited to cross-compiling existing code after the fact. All the major libraries of the Scala/JVM ecosystem have been ported to Scala.js by now, several of them only by changing the build script! And I'm talking about serious, language feature-intensive libraries like Scalaz and Shapeless.