2014-09-25 09:11:18 -05:00
|
|
|
# Rust documentations
|
|
|
|
|
|
|
|
## Dependencies
|
2014-01-11 08:19:38 -06:00
|
|
|
|
|
|
|
[Pandoc](http://johnmacfarlane.net/pandoc/installing.html), a universal
|
|
|
|
document converter, is required to generate docs as HTML from Rust's
|
|
|
|
source code.
|
|
|
|
|
2014-09-25 09:11:18 -05:00
|
|
|
## Building
|
2014-01-11 08:19:38 -06:00
|
|
|
|
|
|
|
To generate all the docs, just run `make docs` from the root of the repository.
|
|
|
|
This will convert the distributed Markdown docs to HTML and generate HTML doc
|
|
|
|
for the 'std' and 'extra' libraries.
|
|
|
|
|
|
|
|
To generate HTML documentation from one source file/crate, do something like:
|
|
|
|
|
|
|
|
~~~~
|
2014-08-17 14:37:51 -05:00
|
|
|
rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
|
2014-01-11 08:19:38 -06:00
|
|
|
~~~~
|
|
|
|
|
|
|
|
(This, of course, requires a working build of the `rustdoc` tool.)
|
|
|
|
|
2014-09-25 09:11:18 -05:00
|
|
|
## Additional notes
|
2014-01-11 08:19:38 -06:00
|
|
|
|
2014-03-09 05:06:03 -05:00
|
|
|
To generate an HTML version of a doc from Markdown manually, you can do
|
|
|
|
something like:
|
2014-01-11 08:19:38 -06:00
|
|
|
|
|
|
|
~~~~
|
2014-09-19 12:45:20 -05:00
|
|
|
pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
|
2014-01-11 08:19:38 -06:00
|
|
|
~~~~
|
|
|
|
|
2014-09-25 09:11:18 -05:00
|
|
|
(`reference.md` being the Rust Reference Manual.)
|
2014-01-11 08:19:38 -06:00
|
|
|
|
|
|
|
The syntax for pandoc flavored markdown can be found at:
|
2014-09-25 09:11:18 -05:00
|
|
|
|
|
|
|
- http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
|
2014-01-11 08:19:38 -06:00
|
|
|
|
|
|
|
A nice quick reference (for non-pandoc markdown) is at:
|
2014-01-13 00:18:04 -06:00
|
|
|
|
2014-09-25 09:11:18 -05:00
|
|
|
- http://kramdown.gettalong.org/quickref.html
|