Scala.js support
Closed this issue ยท 19 comments
I think the layering on top of RxJava makes that road impossible.
An interesting thing, though, would be to copy the whole RxScala project into a new folder, and then replace all calls to RxJava by calls to RxJS, and to compile it with Scala.js. Then we could cross-build Scala code using Observables for the JVM and for JavaScript.
That's definitively possible, but the API differences are nontrivial.
So what are the biggest API differences between RxJava and RxJS? As far as backpressure is concerned, it looks like RxJS will move closer to what RxJava does (see Roadmap for RxJS 2.4 and Future work on backpressure).
Wouldn't it be possible to convert the RxJava code to Scala code?
Sounds a bit crazy, but maybe you could do so using a Java to Scala converter, such as http://javatoscala.com/ ...
I was thinking the same thing. Probably not going to work 100%, but might be better than converting everything to RxJS.
Sounds a bit crazy, but maybe you could do so using a Java to Scala converter, such as http://javatoscala.com/ ...
I think most of Schedulers won't work since Scala.js/JavaScript doesn't support threads.
Ah yes, in that case, might be easier to just write a facade to RxJs
If anyone's interested, I've started a wraper some time ago: https://github.com/lukajcb/rxscala-js
Interesting... Did you also write some sample RxScala apps which cross-compile to both JVM and JS?
Cool ๐ It would be great to see some samples :)
Working on it as we speak, there's still tons of work to do, but I'm trying to keep it as close to the Scala Api as possible!
I'm finally at a point where I'm confident with showing it, be free to check it out! :)
https://github.com/lukajcb/rxscala-js
The API now mostly works just as the RxScala Api.
Nice!
Nice ๐
Are you already using it in a project of yours?
Not yet, but once it's fully polished I'd like to build a minimal Web framework on top of it and virtual dom. ๐
I did a (very) quick port of Sergi Mansilla's Spaceship Reactive, which can be found here: https://github.com/LukaJCB/RxScalaJsSamples. And the working version can be found at https://lukajcb.github.io/RxScalaJsSamples/
Due to project EOL status, Scala.JS will not be supported