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
Zero-Cost Abstractions
Zero-Cost Abstractions
Rust’s abstractions compile down to efficient machine code with no runtime overhead. You get high-level expressiveness without sacrificing performance.
Memory Safety Without Garbage Collection
Memory Safety Without Garbage Collection
The ownership system ensures memory safety at compile-time without needing a garbage collector, giving you deterministic resource management.
Fearless Concurrency
Fearless Concurrency
Rust’s type system prevents data races, making it easier to write concurrent code that’s both safe and efficient.
Great Diagnostics
Great Diagnostics
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:- Forums: Visit users.rust-lang.org for general questions
- Chat: Join Zulip or Discord for real-time help
- Contributing: See our Contributing Guide
- Compiler Development: Read the rustc dev guide
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