]>
Commit | Line | Data |
---|---|---|
cc61c64b XL |
1 | # The Rustonomicon |
2 | ||
3 | The Dark Arts of Advanced and Unsafe Rust Programming | |
4 | ||
5 | Nicknamed "the Nomicon." | |
6 | ||
7 | ## NOTE: This is a draft document, and may contain serious errors | |
8 | ||
416331ca XL |
9 | > Instead of the programs I had hoped for, there came only a shuddering |
10 | blackness and ineffable loneliness; and I saw at last a fearful truth which no | |
11 | one had ever dared to breathe before — the unwhisperable secret of secrets — The | |
12 | fact that this language of stone and stridor is not a sentient perpetuation of | |
13 | Rust as London is of Old London and Paris of Old Paris, but that it is in fact | |
cc61c64b XL |
14 | quite unsafe, its sprawling body imperfectly embalmed and infested with queer |
15 | animate things which have nothing to do with it as it was in compilation. | |
16 | ||
17 | This book digs into all the awful details that are necessary to understand in | |
18 | order to write correct Unsafe Rust programs. Due to the nature of this problem, | |
19 | it may lead to unleashing untold horrors that shatter your psyche into a billion | |
20 | infinitesimal fragments of despair. | |
21 | ||
22 | ### Requirements | |
23 | ||
24 | Building the Nomicon requires [mdBook]. To get it: | |
25 | ||
416331ca | 26 | [mdBook]: https://github.com/rust-lang-nursery/mdBook |
cc61c64b XL |
27 | |
28 | ```bash | |
29 | $ cargo install mdbook | |
30 | ``` | |
31 | ||
416331ca | 32 | ### `mdbook` usage |
cc61c64b | 33 | |
416331ca | 34 | To build the Nomicon use the `build` sub-command: |
cc61c64b XL |
35 | |
36 | ```bash | |
37 | $ mdbook build | |
38 | ``` | |
39 | ||
416331ca XL |
40 | The output will be placed in the `book` subdirectory. To check it out, open the |
41 | `index.html` file in your web browser. You can pass the `--open` flag to `mdbook | |
42 | build` and it'll open the index page in your default browser (if the process is | |
43 | successful) just like with `cargo doc --open`: | |
cc61c64b | 44 | |
cc61c64b | 45 | ```bash |
416331ca | 46 | $ mdbook build --open |
cc61c64b XL |
47 | ``` |
48 | ||
416331ca | 49 | There is also a `test` sub-command to test all code samples contained in the book: |
cc61c64b XL |
50 | |
51 | ```bash | |
52 | $ mdbook test | |
53 | ``` | |
54 | ||
55 | ## Contributing | |
56 | ||
416331ca XL |
57 | Given that the Nomicon is still in a draft state, we'd love your help! Please |
58 | feel free to open issues about anything, and send in PRs for things you'd like | |
59 | to fix or change. If your change is large, please open an issue first, so we can | |
60 | make sure that it's something we'd accept before you go through the work of | |
61 | getting a PR together. |