]> git.proxmox.com Git - rustc.git/blame - src/doc/nomicon/README.md
New upstream version 1.40.0+dfsg1
[rustc.git] / src / doc / nomicon / README.md
CommitLineData
cc61c64b
XL
1# The Rustonomicon
2
3The Dark Arts of Advanced and Unsafe Rust Programming
4
5Nicknamed "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
10blackness and ineffable loneliness; and I saw at last a fearful truth which no
11one had ever dared to breathe before — the unwhisperable secret of secrets — The
12fact that this language of stone and stridor is not a sentient perpetuation of
13Rust as London is of Old London and Paris of Old Paris, but that it is in fact
cc61c64b
XL
14quite unsafe, its sprawling body imperfectly embalmed and infested with queer
15animate things which have nothing to do with it as it was in compilation.
16
17This book digs into all the awful details that are necessary to understand in
18order to write correct Unsafe Rust programs. Due to the nature of this problem,
19it may lead to unleashing untold horrors that shatter your psyche into a billion
20infinitesimal fragments of despair.
21
22### Requirements
23
24Building 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 34To build the Nomicon use the `build` sub-command:
cc61c64b
XL
35
36```bash
37$ mdbook build
38```
39
416331ca
XL
40The 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
42build` and it'll open the index page in your default browser (if the process is
43successful) just like with `cargo doc --open`:
cc61c64b 44
cc61c64b 45```bash
416331ca 46$ mdbook build --open
cc61c64b
XL
47```
48
416331ca 49There 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
57Given that the Nomicon is still in a draft state, we'd love your help! Please
58feel free to open issues about anything, and send in PRs for things you'd like
59to fix or change. If your change is large, please open an issue first, so we can
60make sure that it's something we'd accept before you go through the work of
61getting a PR together.