]> git.lizzy.rs Git - rust.git/blob - src/doc/README.md
rollup merge of #21437: FlaPer87/snapshot
[rust.git] / src / doc / README.md
1 # Rust documentations
2
3 ## Dependencies
4
5 [Pandoc](http://johnmacfarlane.net/pandoc/installing.html), a universal
6 document converter, is required to generate docs as HTML from Rust's
7 source code.
8
9 ## Building
10
11 To generate all the docs, just run `make docs` from the root of the repository.
12 This will convert the distributed Markdown docs to HTML and generate HTML doc
13 for the 'std' and 'extra' libraries.
14
15 To generate HTML documentation from one source file/crate, do something like:
16
17 ~~~~
18 rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
19 ~~~~
20
21 (This, of course, requires a working build of the `rustdoc` tool.)
22
23 ## Additional notes
24
25 To generate an HTML version of a doc from Markdown manually, you can do
26 something like:
27
28 ~~~~
29 pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
30 ~~~~
31
32 (`reference.md` being the Rust Reference Manual.)
33
34 The syntax for pandoc flavored markdown can be found at:
35
36 - http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
37
38 A nice quick reference (for non-pandoc markdown) is at:
39
40 - http://kramdown.gettalong.org/quickref.html