rustdoc - generate documentation from Rust source code
rustdoc [OPTIONS] INPUT
This tool generates API reference documentation by extracting comments from source code written in the Rust language, available at <https://www.rust-lang.org>. It accepts several input formats and provides several output formats for the generated documentation.
-r, --input-format FORMAT html or json (default: inferred) -w, --output-format FORMAT html or json (default: html) -o, --output OUTPUT where to place the output (default: doc/ for html, doc.json for json) --passes LIST spaceseparated list of passes to run (default: '') --no-defaults don't run the default passes --plugins LIST space-separated list of plugins to run (default: '') --plugin-path DIR directory to load plugins from (default: /tmp/rustdoc_ng/plugins) --target TRIPLE target triple to document --crate-name NAME specify the name of this crate -L, --library-path DIR directory to add to crate search path --cfg SPEC pass a --cfg to rustc --extern VAL pass an --extern to rustc --test run code examples as tests --test-args ARGS pass arguments to the test runner --html-in-header FILE file to add to <head> --html-before-content FILE file to add in <body>, before content --html-after-content FILE file to add in <body>, after content --markdown-css FILE CSS files to include via <link> in a rendered Markdown file --markdown-playground-url URL URL to send code snippets to --markdown-no-toc don't include table of contents -h, --help Print help -V, --version Print rustdoc's version
The rustdoc tool can generate output in either an HTML or JSON format. If using an HTML format, then the specified output destination will be the root directory of an HTML structure for all the documentation. Pages will be placed into this directory, and source files will also possibly be rendered into it as well. If using a JSON format, then the specified output destination will have the rustdoc output serialized as JSON into it. This output format exists to precompile documentation for crates, and for usage in non rustdoc tools. The JSON output is the following hash: { "schema": VERSION, "crate": ..., "plugins": ..., } The schema version indicates what the structure of crate/plugins will look like. Within a schema version the structure will remain the same. The crate field will contain all relevant documentation for the source being documented, and the plugins field will contain the output of the plugins run over the crate.
To generate documentation for the source in the current directory: $ rustdoc hello.rs List all available passes that rustdoc has, along with default passes: $ rustdoc --passes list To precompile the documentation for a crate, and then use it to render html at a later date: $ rustdoc -w json hello.rs $ rustdoc doc.json The generated HTML can be viewed with any standard web browser.
rustc(1)
See <https://github.com/rust-lang/rust/issues> for issues.
See AUTHORS.txt in the Rust source distribution.
This work is duallicensed under Apache 2.0 and MIT terms. See COPYRIGHT file in the rust source distribution.
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.