Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Latest commit

 

History

History
75 lines (50 loc) · 2.7 KB

README.md

File metadata and controls

75 lines (50 loc) · 2.7 KB

Rustc Internal Docs

Build Status

A continually updated copy of rustc's internals hosted by GitHub pages.

https://michael-f-bryan.github.io/rustc-internal-docs/

Getting Started

I've completely rewritten the old bash script I used for this into a small Rust program. To install the Rust program you can either check out the repo and run cargo install, or do

$ cargo install --git https://github.com/Michael-F-Bryan/rustc-internal-docs

Lets check to make sure everything is working correctly:

$ rustc-internal-docs --help
rustc-internal-docs 0.1.0
Michael Bryan <[email protected]>


USAGE:
    rustc-internal-docs [FLAGS] [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -s, --syslog     Log to the system logger instead of stdout (also accepts the USE_SYSLOG env variable)
    -V, --version    Prints version information
    -v, --verbose    Sets the verbosity level (repeat for more verbosity)

OPTIONS:
    -c, --config <config-file>    The config file for rustc-internal-docs [default: /home/$USER/.rustc-internal-docs.toml]

Then make sure you have a copy of the config file in your home directory.

$ curl -o- -L https://github.com/Michael-F-Bryan/rustc-internal-docs/raw/master/rustc-internal-docs.toml > ~/.rustc-internal-docs.toml

If you are just wanting to use this for personal use, you'll want to open the config file and set skip-upload to true. This means it'll still build the internal compiler documentation in your rust-dir, but will skip the uploading to GitHub Pages step.

Next, to get the best use out of this tool I'll add it as a cron job so I always have an up-to-date version of the docs.

0 */6 * * * USE_SYSLOG=1 /home/michael/.cargo/bin/rustc-internal-docs -v 

Note: The USE_SYSLOG environment variable tells rustc-internal-docs to log to the system logger. This means I can view logs just like any other service on my system (journalctl -e -t rustc-internal-docs)... Plus cron will usually try to email you when any job prints something to stdout/stderr and that gets pretty annoying after a while.

Contributing

If you have a feature request or bug fix, open up an issue and I'll see what I can do about it. Pull Requests are also welcome!