From 7fdfff6e58cd30548b1d02946364b746243cdc02 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 23 Oct 2015 13:51:29 -0700 Subject: [PATCH] Update README for stable build --- README.md | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8c76e8ec51c..06e8dae54f3 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,34 @@ A tool for formatting Rust code according to style guidelines. ## Gotchas -* For things you do not want rustfmt to mangle, use -```rust - #[rustfmt_skip] - ``` -* When you run rustfmt use a file called rustfmt.toml to override the default settings of rustfmt. -* We create a functioning executable called rustfmt in the target directory + +* For things you do not want rustfmt to mangle, use one of + ```rust + #[rustfmt_skip] + #[cfg_attr(rustfmt, rustfmt_skip)] + ``` +* When you run rustfmt use a file called rustfmt.toml to override the default + settings of rustfmt. +* We create a functioning executable called `rustfmt` in the target directory + +## Installation + +> **Note:** this method currently requires you to be running a nightly install +> of Rust as `cargo install` has not yet made its way onto the stable channel. + +``` +cargo install --git https://github.com/nrc/rustfmt +``` + +or if you're using `multirust` + +``` +multirust run nightly cargo install --git https://github.com/nrc/rustfmt +``` ## How to build and test -You'll need a pretty up to date version of the **nightly** version of Rust. + +First make sure you've got Rust **1.3.0** or greater available, then: `cargo build` to build.