-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add playpen topic #1324
Merged
marioidival
merged 5 commits into
rust-lang:master
from
jsjoeio:jsjoeio/108-add-playpen-topic
Mar 29, 2020
Merged
feat: add playpen topic #1324
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
06bad89
refactor: remove testing & benchmarking from meta
jsjoeio 2070064
fix: add .DS_Stoe to gitignore
jsjoeio ef4ad08
feat: add link in meta to documentation
jsjoeio 9827595
feat: add playpen topic
jsjoeio 3e42f06
feat: add playpen topic to meta
jsjoeio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
book | ||
|
||
# Auto-generated files from macOS | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,3 +213,4 @@ | |
|
||
- [Meta](meta.md) | ||
- [Documentation](meta/doc.md) | ||
- [Playpen](meta/playpen.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Playpen | ||
|
||
The [Rust Playpen](https://github.com/rust-lang/rust-playpen) is a way to experiment with Rust code through a web interface. This project is now commonly referred to as [Rust Playground](https://play.rust-lang.org/). | ||
|
||
## Using it with `mdbook` | ||
|
||
In [`mdbook`][mdbook], you can make code examples playable and editable. | ||
|
||
```rust,editable | ||
fn main() { | ||
println!("Hello World!"); | ||
} | ||
``` | ||
|
||
This allows the reader to both run your code sample, but also modify and tweak it. The key here is the adding the word `editable` to your codefence block separated by a comma. | ||
|
||
````markdown | ||
```rust,editable | ||
//...place your code here | ||
``` | ||
```` | ||
|
||
## Using it with docs | ||
|
||
You may have noticed in some of the [official Rust docs][official-rust-docs] a button that says "Run", which opens the code sample up in a new tab in Rust Playground. This feature is enabled if you use the #[doc] attribute called [`html_playground_url`][html-playground-url]. | ||
|
||
### See also: | ||
|
||
- [The Rust Playground][rust-playground] | ||
- [The next-gen playpen][next-gen-playpen] | ||
- [The rustdoc Book][rustdoc-book] | ||
|
||
[rust-playground]: https://play.rust-lang.org/ | ||
[next-gen-playpen]: https://github.com/integer32llc/rust-playground/ | ||
[mdbook]: https://github.com/rust-lang/mdBook | ||
[official-rust-docs]: https://doc.rust-lang.org/core/ | ||
[rustdoc-book]: https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html | ||
[html-playground-url]: https://doc.rust-lang.org/rustdoc/the-doc-attribute.html#html_playground_url |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gut check: is this correct and accurate?