zig-play icon indicating copy to clipboard operation
zig-play copied to clipboard

Loading and saving programs from the playground

Open jarble opened this issue 2 years ago • 3 comments

There's currently no way to share links to programs in the Zig playground. But there should be a way to save a link to a program in a query string, like this:

https://zig-play.dev/?source_code_goes_here

I would use encodeURIComponent to convert the source code to a query string, and then use decodeURIcomponent to convert it back to source code.

jarble avatar Jul 24 '21 18:07 jarble