3 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/).
5 ## Using it with `mdbook`
7 In [`mdbook`][mdbook], you can make code examples playable and editable.
11 println!("Hello World!");
15 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.
19 //...place your code here
23 Additionally, you can add `ignore` if you want `mdbook` to skip your code when it builds and tests.
26 ```rust,editable,ignore
27 //...place your code here
33 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].
37 - [The Rust Playground][rust-playground]
38 - [The next-gen playpen][next-gen-playpen]
39 - [The rustdoc Book][rustdoc-book]
41 [rust-playground]: https://play.rust-lang.org/
42 [next-gen-playpen]: https://github.com/integer32llc/rust-playground/
43 [mdbook]: https://github.com/rust-lang/mdBook
44 [official-rust-docs]: https://doc.rust-lang.org/core/
45 [rustdoc-book]: https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html
46 [html-playground-url]: https://doc.rust-lang.org/rustdoc/the-doc-attribute.html#html_playground_url