Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate code in playground #414

Open
tom-sherman opened this issue Jul 11, 2021 · 2 comments · May be fixed by #420 or #415
Open

Evaluate code in playground #414

tom-sherman opened this issue Jul 11, 2021 · 2 comments · May be fixed by #420 or #415

Comments

@tom-sherman
Copy link

The TypeScript playground has this great feature where you can run the generated JS code, would you accept a PR to add a similar UI to the ReScript Playground?

@tom-sherman
Copy link
Author

I've started hacking around on this, my approach right now is:

  • Create an Eval module that uses a Worker under the hood
  • Eval exposes a state machine for evaluating code
  • Figure out some way of bundling the whole of rescript std lib and including it in the worker file

@tom-sherman tom-sherman linked a pull request Jul 11, 2021 that will close this issue
3 tasks
@ryyppy
Copy link
Member

ryyppy commented Jul 12, 2021

would you accept a PR to add a similar UI to the ReScript Playground?

Yes I would!

Figure out some way of bundling the whole of rescript std lib and including it in the worker file

That will be the most interesting part. I could take over the pipeline for bundling the right stdlib / compiler files, but I am not sure if we need to generate worker files for each compiler version, or if there's a way to point to a specific bundle file via one single entry point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants