You'll probably never use the compiler directly; the usual way to build a Rust program is to use Cargo. Part of the Rust distribution.
- Source code.
- Contributing
- Dev docs
- Install using Rustup (see below).
Cargo is Rust's package manager and build system. It is distributed with Rust by default so you don't need to use it.
- Source code
- Documentation
- Install using Rustup (see below).
Rustup is a tool for installing Rust and managing Rust toolchains, for example for different channels (nightly, beta, etc.) or target platforms for cross- compilation.
Xargo is a tool to help with cross-compilation. It builds and manages versions
of the standard libraries, and manages Cargo targets. It is a drop-in
replacement for Cargo, e.g., you use xargo build
instead of cargo build
.
- Install using Cargo:
cargo install xargo
, or download a binary release. - Source code
- Documentation
A tool that watches the disk for changes and starts a build when you change a
file in your project. Run with cargo watch
.
- Install with
cargo install cargo-watch
. - Source code
- Documentation
- Developer docs
Many editors have some Rust support, from basic syntax highlighting to full IDE features.
For IDE support we recommend either VSCode with the Rust Language Server or IntelliJ. The Rust Language Server is an editor-independent service for providing IDE functionality using the Language Server Protocol. Any editor can be an RLS client and we hope many editors will take advantage of it.
Visual Studio Code is a cross-platform, open source IDE from Microsoft. It has very basic support (syntax highlighting) out of the box. For better Rust support, install the Rust (RLS) plugin:
- In the VSCode Marketplace
- Install in VSCode with
ext install rust
in the command palette. - Source code
- Developer docs
The power behind the above VSCode extension is the RLS. It interacts with the compiler to provide information about Rust programs to IDEs and editors. You probably don't want to use it directly, but rather via an editor extension.
- Install with
rustup component add rls
(but your editor should do this for you) - Source code
- Documentation and developer docs
Rust support in IntelliJ is provided by JetBrains via an open source plugin, written in Kotlin. It uses its own Rust programming language model instead of RLS, so some features available in RLS might not be available in IntelliJ and vice verse.
Many editors have plugins or extensions that provide some degree of support (syntax highlighting, snippets, etc.). Racer is a tool for providing code completion and 'goto def' features. It uses it's own parsing and type inference, so is very quick, but sometimes incomplete. There are extensions using Racer for many editors.
- Racer source
- Racer docs
- There is editor support for Racer in Atom, Eclipse, Emacs, GEdit, Kakoune, Kate, Sublime Text, Vim, and Visual Studio Code.
- The Rust teams maintain editor support (configuration and/or syntax highlighting) for Sublime Text, Emacs, Vim, GEdit, Nano, and Kate.
TODO
- gdb - versions, script?
- lldb
- vs
Rustfmt is a tool for automatically formatting Rust code. It enforces the
officially recommended Rust style, or can be configured to your taste. It is
used by the RLS, so if you're using an RLS-powered IDE, you don't separetly need
Rustfmt. If you're not, you can use it with Cargo (cargo fmt
) or standalone
(rustfmt
).
- Install using
cargo install rustfmt-nightly
(if you use nightly Rust) orcargo install rustfmt
(if you use stable Rust). - Source code
- Documentation
- Developer docs
TODO
- bindgen - https://servo.github.io/rust-bindgen/
- not tools - neon, helix, etc.
Clippy is a collection of lints to catch common mistakes and improve your Rust code.
It also covers code style issues that aren't just syntactical and require type information.
It comes as a compiler plugin and as a cargo subcommand (cargo clippy
).
- Install using
cargo install clippy
(requries nightly) - Source code
- Lint Documentation
- Contribution docs
TODO
- sanitisers
Rustdoc generates API documentation for Rust crates. You probably don't need to use rustdoc
directly (instead going through cargo doc
). Accepts a crate and generates HTML pages for its
public documentation. Can also execute code blocks within the documentation as tests. Part of the
normal Rust distribution.
- Source code (part of the Rust compiler source code)
- Install using Rustup (see above). Installed by default when you get rustc.
In-progress reimplementation of rustdoc using the RLS as a backend (rather than compiler-internal libraries). Plans include JSON output, multiple pluggable "frontends" to render as different formats, and separating out the HTML design to allow more contributors to work on the site design.
The initial plans for the new rustdoc were discussed during the dev-tools meeting on 2017-05-30.
TODO
- rustw
- docs.rs
Rust-semverver is a tool to verify semantic versioning in Rust library crates. It compiles two given versions of a crate together and uses the compiler's internals to match up items and to determine changes, classifying them according to the semver specification applied to the Rust typesystem, as outlined in the API evolution RFC.
TODO
- test, bench
- cargo fuzz
- compiletest
- coverage