Editors, Toolchains and the Rust Playground
rust-analyzer gives any editor Rust intelligence, rustfmt and Clippy keep code tidy and idiomatic, rustup switches between stable, beta and nightly, and the Playground runs Rust in a browser.
Select a toolchain and distinguish local tooling from the browser Playground.
Rust's compiler is strict, so the best setup is one that shows you its complaints while you type, not after a long build. The good news: one language server powers nearly every editor, and two small tools keep the whole team's code consistent.
The rule
rust-analyzer in the editor, fmt and clippy before commit, stable by default.
rust-analyzer is Rust's language server. Install its extension in VS Code, Zed, Neovim, Emacs or Helix (JetBrains has its own RustRover) and you get red underlines, type hints, auto-complete and "go to definition" as you type.
Two tools ship with rustup:
cargo fmt # rustfmt: rewrites layout to the standard style
cargo clippy # Clippy: hundreds of lints for bugs and clumsy codecargo fmt ends arguments about spacing. cargo clippy goes further than the compiler: it might suggest if on_loan.is_empty() instead of if on_loan.len() == 0.
Toolchain channels come from rustup:
- stable: a new release every six weeks. Use this.
- beta: the next stable, being tested.
- nightly: built every day, with unfinished features behind flags.
rustup toolchain install nightly
cargo +nightly build # one command on nightly, project stays on stableThe Rust Playground (play.rust-lang.org) compiles and runs Rust in the browser. You can pick the channel, switch between debug and release, run Clippy or rustfmt, and share the snippet as a link. It also offers a set of the most popular crates. It is ideal for a quick question, not for a whole project with its own files.