Skip to content

Add a Run button to every example #87

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

Closed
dtolnay opened this issue May 16, 2017 · 4 comments
Closed

Add a Run button to every example #87

dtolnay opened this issue May 16, 2017 · 4 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented May 16, 2017

We used to have one but it didn't work: https://github.com/brson/rust-cookbook/issues/32.

We could use an approach more like https://serde.rs where it links to a playground rather than running the code inline. See this page for example. This is nice because you get to modify the code if you want.

@budziq
Copy link
Collaborator

budziq commented Jul 14, 2017

As discussed on Use the crates from the libz blitz? rust-lang/rust-playground#168 the integer32 rust playground team is willing to coordinate with us on the list of preloaded crates.

Cookbook would be also interested on a json list of supported crates that we could consume in runtime to (re)enable play buttons for given examples.

As suggested by @KodrAus one or both parties might expose static json lists via raw github content.
What is left is to discuss the details.

cc @shepmaster

@shepmaster
Copy link

The static lists I could go either way on. That is, if we want to say that the cookbook libs should be in the playground, I'm cool with that. We can add a whitelist easily. Then we could just accept a PR every time a library goes though the blitz. I don't know if we want to start with worrying about if this crate available or not - just assume all are. A thing that would change my mind would be if we know there are incompatibilities.

@budziq
Copy link
Collaborator

budziq commented Jul 15, 2017

I guess that I would prefer to treat the playpen as semi volatile remote resource as we might add some non blitz crates to cookbook examples and We might want to query the playpen for supported crates prior to enabling play buttons on per example basis.

Having a whitelist would be awesome as we would be able to setup a curation process for the crate list. And we would just push a PR once crate is within the Libz Blitz. Could you specify the form (and possibly create a whitelist stub where you'd like to have it located)

Unfortunately I'll not be able to followup on this for the next two weeks due to holidays but someone from blitz might take it up in the meantime

@budziq
Copy link
Collaborator

budziq commented Sep 18, 2017

fixed by update of mdbook

@budziq budziq closed this as completed Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants