Skip to main content
The Rust Programming Language

Welcome to the Rust Compiler

This is the main source code repository for Rust. It contains the compiler, standard library, and documentation for the Rust programming language - a language empowering everyone to build reliable and efficient software.

Installation

Get started by installing Rust on your system

Quick Start

Build your first Rust program in minutes

Documentation

Learn Rust with The Book

Why Rust?

Rust combines performance, reliability, and productivity in a single package:

Performance

Fast and memory-efficient with no runtime or garbage collector. Rust is suitable for:
  • Performance-critical services
  • Embedded devices
  • Easy integration with other languages

Reliability

Rust’s rich type system and ownership model guarantee memory safety and thread safety, eliminating entire categories of bugs at compile-time. You can confidently make changes without worrying about introducing subtle bugs.

Productivity

Rust provides comprehensive tools and documentation:

Cargo

Integrated package manager and build tool

rustfmt

Auto-formatter for consistent code style

Clippy

Linter with hundreds of helpful suggestions

rust-analyzer

Powerful IDE integration and completion

Key Features

Rust’s abstractions compile down to efficient machine code with no runtime overhead. You get high-level expressiveness without sacrificing performance.
The ownership system ensures memory safety at compile-time without needing a garbage collector, giving you deterministic resource management.
Rust’s type system prevents data races, making it easier to write concurrent code that’s both safe and efficient.
The compiler is committed to providing clear, actionable error messages that help you understand and fix issues quickly.

Getting Help

The Rust community is friendly and welcoming. Here are some resources:
For a list of all chat platforms and forums, visit rust-lang.org/community

License

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

Apache License 2.0

View Apache license terms

MIT License

View MIT license terms

Build docs developers (and LLMs) love