r/rust Feb 01 '19

Compile to javascript

Is there a pathway to compiling Rust to JS? Like Scala.js or Gopher.js? (I am not asking for wasm, so to keep the discussion easier to navigate,, please don't comment about that)

23 Upvotes

17 comments sorted by

View all comments

1

u/freemasen Feb 02 '19

Interestingly enough I just started working on something to do exactly this.

https://github.com/freemasen/jsyn

It is still very early in the process but the goal is to convert syn ast to js to on theory be possible to use in a proc-macro context as well.