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

rustdoc should support submitting code to play.rust-lang.org #14654

Closed
alexcrichton opened this issue Jun 4, 2014 · 2 comments
Closed

rustdoc should support submitting code to play.rust-lang.org #14654

alexcrichton opened this issue Jun 4, 2014 · 2 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@alexcrichton
Copy link
Member

There should be a button on code snippets to submit them to http://play.rust-lang.org/ and have them run.

I don't think that the code snippets should be live-editable in rustdoc like the one on the website.

Note that the repository is located here: https://github.com/rust-lang/rust-playpen

@SiegeLord
Copy link
Contributor

How will this work for non-rust-lang.org hosted documentation? Is this opt-in or opt-out? Is that decision made on a per-crate, per-module or per-snippet basis?

It seems like that for vast majority of 3rd party documentation this feature would not produce useful results, although at the same time, an interested party with sufficient resources could host their own rust interpreter with the necessary crates pre-installed.

@alexcrichton
Copy link
Member Author

Ah that is a good point, it sounds like if this is done then it should be an opt-in basis per crate.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Jun 7, 2014
This grows a new option inside of rustdoc to add the ability to submit examples
to an external website. If the `--markdown-playground-url` command line option
or crate doc attribute `html_playground_url` is present, then examples will have
a button on hover to submit the code to the playground specified.

This commit enables submission of example code to play.rust-lang.org. The code
submitted is that which is tested by rustdoc, not necessarily the exact code
shown in the example.

Closes rust-lang#14654
mcpherrinm pushed a commit to mcpherrinm/rust that referenced this issue Jun 10, 2014
This grows a new option inside of rustdoc to add the ability to submit examples
to an external website. If the `--markdown-playground-url` command line option
or crate doc attribute `html_playground_url` is present, then examples will have
a button on hover to submit the code to the playground specified.

This commit enables submission of example code to play.rust-lang.org. The code
submitted is that which is tested by rustdoc, not necessarily the exact code
shown in the example.

Closes rust-lang#14654
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
fix: Fix status command panicking when additional LRU caches are set up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants