ReScript Playground Share-Link Support

Hey everyone,

We finally got around adding share-link functionality to the redesigned playground. This means that you are now able to copy a sharable url to your clipboard with the Copy Share Link button:

Here is an example of a share link:

https://rescript-lang.org/try?code=LYewJgrgNgpgBACRlKIDqIBOUxwLxwDeAUHHLAC5zACGA1vAQBQCU+AfEaWXADxgBLAG6dCAIgAqACwEBnOLIB2AgA4qYVAO415KzCCECwMXIZpxzsqTUzwoAxXQCEYgLTsASjBoBjCgDpZCkwHAHMAXz4AekERbnDiBKA

A few notes:

  • We intentionally clean up the url bar after loading the playground to prevent ppl from copying outdated urls from the address bar. We will eventually change that behavior as soon as we know more about actual usage patterns
  • The created share link will contain the currently selected syntax as well so it’s easy to share Reason snippets
  • We will add more query parameters (like compiler version etc) in the future. For now it will always load snippets with the latest compiler version in nodejs output mode.

In case you are having any issues or feedback, feel free to open a ticket on our issue tracker.

Enjoy!

17 Likes