| commit | 8a63d8bb8d620554ae0cb019d6494d8f7db13f92 | [log] [tgz] |
|---|---|---|
| author | mautam <mautam@usa.com> | Fri May 30 19:43:14 2025 -0400 |
| committer | mautam <mautam@usa.com> | Fri May 30 19:53:04 2025 -0400 |
| tree | 1a21e9633ec92ece45b37ab29c7520af47073295 | |
| parent | 21f4e32b8b40d36453fae16ec07ad4b857c445b6 [diff] |
fix(#1656): update doc tests to use `playground` as the crate name This updates the Documentation Testing (21.2) chapter to assume a crate name of `playground` instead of `doccomments`. This allows for the code contained within to be copy-pasted directly into play.rust-lang.org to run; anyone who would want to reproduce this locally would want to create a `playground` library. Fixes #1656.
Learn Rust with examples (Live code editor included)
If you'd like to read Rust by Example, you can visit https://doc.rust-lang.org/rust-by-example/ to read it online.
If you'd like to read it locally, install Rust, and then:
git clone https://github.com/rust-lang/rust-by-example cd rust-by-example cargo install mdbook mdbook build mdbook serve
To be able to run the examples, you must be connected to the internet; you can read all content offline, however!
The following warnings can be ignored safely.
[WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "gettext" preprocessor installed? [WARN] (mdbook::preprocess::cmd): Command: mdbook-gettext
If there is a translated resource in po/ directory, it can be specified through MDBOOK_BOOK__LANGUAGE like below:
git clone https://github.com/rust-lang/rust-by-example cd rust-by-example cargo install mdbook MDBOOK_BOOK__LANGUAGE=ja mdbook build MDBOOK_BOOK__LANGUAGE=ja mdbook serve
Please see the CONTRIBUTING.md file for more details.
Please see the TRANSLATING.md file for more details.
Rust by Example is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Rust by Example by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.