2 ms·
Yeah, the relationship is a bit different. In Rust, we tend to have docs that embed the playground or link to it, rather than having the playground link to docs
by steveklabnik 6y ago
Yeah, the relationship is a bit different. In Rust, we tend to have docs that embed the playground or link to it, rather than having the playground link to docs.
- mkesper 6y agoExamples from the book shouldn't be too hard or at least some link to it?
- steveklabnik 6y agoSure. Here's a random page on the book: https://doc.rust-lang.org/stable/book/ch08-01-vectors.html https://doc.rust-lang.org/stable/book/ch08-01-vectors.html You can click the arrows to run the code. This effectively makes an AJAX call to the playpen, and puts the results back on the page. Here's a random page from the API docs: https://doc.rust-lang.org/stable/std/string/struct.String.html#examples https://doc.rust-lang.org/stable/std/string/struct.String.ht... Those "run" buttons will open up the example in the playpen so you can play around with it. I think ideally these would all let you edit in place, run in the page, or open in the playpen, but they use slightly different tooling and nobody has put in the work to make it all identical yet.