|
| 1 | +- Feature Name: N/A |
| 2 | +- Start Date: 2016-12-25 |
| 3 | +- RFC PR: |
| 4 | +- Rust Issue: |
| 5 | + |
| 6 | +# Summary |
| 7 | +[summary]: #summary |
| 8 | + |
| 9 | +Create a "Rust Bookshelf" of learning resources for Rust. |
| 10 | + |
| 11 | +* Pull the book out of tree into `rust-lang/book`, which holds the second |
| 12 | + edition, currently. |
| 13 | +* Pull the nomicon and the reference out of tree and convert them to mdBook. |
| 14 | +* Pull the cargo docs out of tree and convert them to mdBook. |
| 15 | +* Create a new "Nightly Book" in-tree. |
| 16 | +* Provide a path forward for more long-form documentation to be maintained by |
| 17 | + the project. |
| 18 | + |
| 19 | +This is largely about how doc.rust-lang.org is organized; today, it points to |
| 20 | +the book, the reference, the nomicon, the error index, and the standard library |
| 21 | +docs. This suggests unifying the first three into one thing. |
| 22 | + |
| 23 | +# Motivation |
| 24 | +[motivation]: #motivation |
| 25 | + |
| 26 | +There are a few independent motivations for this RFC. |
| 27 | + |
| 28 | +* Separate repos for separate projects. |
| 29 | +* Consistency between long-form docs. |
| 30 | +* A clear place for unstable documentation, which is now needed for |
| 31 | + stabilization. |
| 32 | +* Better promoting good resources like the 'nomicon, which may not be as well |
| 33 | + known as "the book" is. |
| 34 | + |
| 35 | +These will be discussed further in the detailed design. |
| 36 | + |
| 37 | +# Detailed design |
| 38 | +[design]: #detailed-design |
| 39 | + |
| 40 | +Several new repositories will be made, one for each of: |
| 41 | + |
| 42 | +* The Rustinomicon ("the 'nomicon") |
| 43 | +* The Cargo Book |
| 44 | +* The Rust Reference Manual |
| 45 | + |
| 46 | +These would live under the `rust-lang` organization. |
| 47 | + |
| 48 | +They will all use mdBook to build. They will have their existing text re-worked |
| 49 | +into the format; at first a simple conversion, then more major improvements. |
| 50 | +Their current text will be removed from the main tree. |
| 51 | + |
| 52 | +The first edition of the book lives in-tree, but the second edition lives in |
| 53 | +`rust-lang/book`. We'll remove the existing text from the tree and move it |
| 54 | +into `rust-lang/book`. |
| 55 | + |
| 56 | +A new book will be created from the "Nightly Rust" section of the book. It will |
| 57 | +be called "The Nightly Book," and will contain unstable documentation for both |
| 58 | +rustc and Cargo, as well as material that will end up in the reference. This |
| 59 | +came up when [trying to document RFC |
| 60 | +1623](https://github.com/rust-lang/rust/pull/37928). We don't have a unified |
| 61 | +way of handling unstable documentation. This will give it a place to develop, |
| 62 | +and part of the stabilization process will be moving documentation from this |
| 63 | +book into the other parts of the documentation. |
| 64 | + |
| 65 | +The nightly book will be organized around `#![feature]`s, so that you can look |
| 66 | +up the documentation for each feature, as well as seeing which features |
| 67 | +currently exist. |
| 68 | + |
| 69 | +The nightly book is in-tree so that it runs more often, as part of people's |
| 70 | +normal test suite. This doesn't mean that the book won't run on every commit; |
| 71 | +just that the out-of-tree books will run mostly in CI, whereas the nightly |
| 72 | +book will run when developers do `x.py check`. This is similar to how, today, |
| 73 | +Traivs runs a subset of the tests, but buildbot runs all of them. |
| 74 | + |
| 75 | +The landing page on doc.rust-lang.org will show off the full bookshelf, to let |
| 76 | +people find the documenation they need. It will also link to their respective |
| 77 | +repositories. |
| 78 | + |
| 79 | +Finally, this creates a path for more books in the future: "the FFI Book" would |
| 80 | +be one example of a possibility for this kind of thing. The docs team will |
| 81 | +develop critera for accepting a book as part of the official project. |
| 82 | + |
| 83 | +# How We Teach This |
| 84 | +[how-we-teach-this]: #how-we-teach-this |
| 85 | + |
| 86 | +The landing page on doc.rust-lang.org will show off the full bookshelf, to let |
| 87 | +people find the documenation they need. It will also link to their respective |
| 88 | +repositories. |
| 89 | + |
| 90 | +# Drawbacks |
| 91 | +[drawbacks]: #drawbacks |
| 92 | + |
| 93 | +A ton of smaller repos can make it harder to find what goes where. |
| 94 | + |
| 95 | +Removing work from `rust-lang/rust` means people aren't credited in release |
| 96 | +notes any more. I will be opening a separate RFC to address this issue, it's |
| 97 | +also an issue without this RFC being accepted. |
| 98 | + |
| 99 | +Operations are harder, but they have to change to support this use-case for |
| 100 | +other reasons, so this does not add any extra burden. |
| 101 | + |
| 102 | +# Alternatives |
| 103 | +[alternatives]: #alternatives |
| 104 | + |
| 105 | +Do nothing. |
| 106 | + |
| 107 | +Do only one part of this, instead of the whole thing. |
| 108 | + |
| 109 | +Move all of the "bookshelf" into one repository, rather than individual ones. |
| 110 | +This would require a lot more label-wrangling, but might be easier. |
| 111 | + |
| 112 | +# Unresolved questions |
| 113 | +[unresolved]: #unresolved-questions |
| 114 | + |
| 115 | +How should the first and second editions of the book live in the same |
| 116 | +repository? |
| 117 | + |
| 118 | +What criteria should we use to accept new books? |
| 119 | + |
| 120 | +Should we adopt "learning Rust with too many Linked Lists"? |
0 commit comments