Run rescript transpiler in browser?

Is it possible to run the rescript transpiler entirely in browser ?

I would like to be able to, without the use of an external server, be able to

  1. write rescript code in the browser
  2. transpile it to js
  3. execute the transpiled js

and do all of the above without the use of an external server.

The playground bundle used
in our online playground exactly does 1 and 2, but not 3. You’d need to get the output, tweak it in some way to eval in your environment.

Note that it’s not trivial to compile third party packages though. The online playground doesn’t come with the same build system as the locally installed compiler.

You need a sandbox environment for doing 3