Open dvberkel opened 7 years ago
An interesting idea!
My first uncollected thoughts:
I'm not against the idea, I just naturally tend to the pessimistic side of things ;-)
What might be "better" is splitting such an idea into the two parts. The Playground could learn an official API and another project could provide the embedding assistance.
@shepmaster Thanks for your feedback. I totally appreciate your skepticism. I fully understand that accepting a feature into a project, means that the burden of maintaining it falls on you. I don't think this is pessimism, just realism.
How would the playground API look like, and how would it differ from the API route the book uses?
I've been looking around and haven't found a way to embed inside other websites. I'm guessing that's still not possible given the lack of activity on this issue :-)
I publish my notes on my blog when I'm learning new things and it would be super cool to have live snippets. So, I want to make sure I'm not missing something.
And a follow up question, if I can pull out the parts from the source code and get it working on my blog, is it okay to use the playground services to do the processing?
The Rust book and other guides use the playground to execute code snippets and display the results inline. This is an awesome way to increase interactivity, especially when the examples are editable as seen in the Rust by Example book.
With some work it is possible to mimic this effect by yourself, but it would be great if there is an easy way to repeatedly include interactive Rust snippets in a website, blog post or HTML presentation.
I was thinking of an embed button that offers a copyable snippet of code, just like the Travis CI aid for embedding the build badge. A corresponding wiki page could provide instructions how to set things up.
Is this something that people are interested in?