Basic
h
h
h
This version of the text assumes you’re using Rust
1.67.1
(released 2023-02-09) or later. See the “Installation” section of Chapter 1 to install or update Rust.
h
rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between stable, beta, and nightly compilers and keep them updated. It makes cross-compiling simpler with binary builds of the standard library for common platforms. And it runs on all platforms Rust supports.
h
Rust Forge serves as a repository of supplementary documentation useful for members of The Rust Programming Language. If you find any mistakes, typos, or want to add to the Rust Forge, feel free to file an issue or PR on the Rust Forge GitHub.
h
This is Rust-101, a small tutorial for the Rust language. It is intended to be an interactive, hands-on course: I believe the only way to really learn a language is to write code in it, so you should be coding during the course.
h
h
Rust is a modern systems programming language focusing on safety, speed, and concurrency. It accomplishes these goals by being memory safe without using garbage collection.
Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries. To get even more out of these examples, don't forget to install Rust locally and check out the official docs. Additionally for the curious, you can also check out the source code for this site.
h
Welcome to “The rustc book”!
rustc
is the compiler for the Rust programming language, provided by the project itself. Compilers take your source code and produce binary code, either as a library or executable.
h
The Rust Standard Library is the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem. It offers core types, like
Vec<T>
andOption<T>
, library-defined operations on language primitives, standard macros, I/O and multithreading, among many other things.std
is available to all Rust crates by default. Therefore, the standard library can be accessed inuse
statements through the pathstd
, as inuse std::env
.
h
h
Welcome to the Rust Edition Guide! “Editions” are Rust's way of communicating large changes in the way that it feels to write Rust code.
h
Rust is a new language that already has good textbooks. But sometimes its textbooks are difficult because they are for native English speakers. Many companies and people now learn Rust, and they could learn faster with a book that has easy English. This textbook is for these companies and people to learn Rust with simple English.
h
Greetings and welcome to
rustlings
. This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages!
https://rust-exercises.com/ - 100 Exercises To Learn Rust [GitHub]
A self-paced course to learn Rust, one exercise at a time.
h
Rust 是一门系统级编程语言,被设计为保证内存和线程安全,并防止段错误。作为系统级编程语言,它的基本理念是 “零开销抽象”。理论上来说,它的速度与 C / C++ 同级。
https://livebook.manning.com/book/rust-in-action/ - Rust in Action[Buy]
Welcome to Rust—the empowering programming language. Once you scratch its surface, you will not only find a programming language with unparalleled speed and safety, but one that is enjoyable enough to use every day.
《Rust in Action》这本书通过探索众多系统编程概念和技术来介绍 Rust 编程语言。你将通过深入研究计算机的底层工作原理来学习 Rust。你会发现自己在玩持久存储、内存、网络,甚至修改 CPU 指令。本书将带你了解如何使用 Rust 扩展其他应用程序,并教你编写超快代码的技巧。你还将学习并行和并发编程。本书将超越 Rust 语法,带你实现在现实生活中可以见到的用例和场景,了解 Rust 在现实世界的场景中必须提供什么。
《Rust in Action》是使用 Rust 进行系统编程的实践指南。它是为有好奇心的程序员编写的,它提供了远远超出语法和结构的实际用例。你将探索用于文件操作、网络和内核级编程的 Rust 实现,并学习用于并行和并发的出色技术。在此过程中,你将掌握 Rust 独特的借用检查器模型,无需垃圾收集器即可进行内存管理。
h
《通过例子学 Rust》(Rust By Example, RBE)内容由一系列可运行的实例组成,通过这些例子阐明了各种 Rust 的概念和基本库。想获取这些例子外的更多内容,不要忘了安装 Rust 到本地并查阅官方标准库文档。另外为了满足您的好奇心,你可以查阅本网站的源代码。
h
《Rust 版本指南》(The Rust Edition Guide 中文版)翻译自 The Rust Edition Guide,内容已全部翻译完成。
h
本文档是学习 Rust 语言本身或者与 Rust 有关的其他资料的知识库,包括了 Rust 语言的翻译指引、Rust 术语中英文对照表,以及 TOML 配置语言。内容将会不断更新拓展。
h
本书由 Rust 核心开发团队编写而成,由浅入深地探讨了 Rust 语言的方方面面。从学习函数、选择数据结构及绑定变量入手,逐步介绍所有权、trait、生命周期、安全保证等高级概念,模式匹配、错误处理、包管理、函数式特性、并发机制等实用工具,以及两个完整的项目开发实战案例。 作为开源的系统级编程语言,Rust 可以帮助你编写出更为快速且更为可靠的软件,在给予开发者底层控制能力的同时,通过深思熟虑的工程设计避免了传统语言带来的诸多麻烦。 本书被视为 Rust 开发工作的必读书目,适合所有希望评估、入门、提高和研究Rust语言的软件开发人员阅读。
h
《Rust编程之道》并非对语法内容进行简单罗列讲解,而是从四个维度深入全面且通透地介绍了Rust 语言。从设计哲学出发,探索Rust 语言的内在一致性;从源码分析入手,探索Rust 地道的编程风格;从工程角度着手,探索Rust 对健壮性的支持;从底层原理开始,探索Rust 内存安全的本质。
《Rust编程之道》涵盖了Rust 2018 的特性,适合有一定编程经验且想要学习Rust 的初学者,以及对Rust 有一定的了解,想要继续深入学习的进阶者。
h
Rust语言圣经涵盖从入门到精通所需的 Rust 知识,目录及内容都经过深思熟虑的设计,同时语言生动幽默,行文流畅自如,摆脱技术书籍常有的机器味和晦涩感。
h
Scott Meyers' original Effective C++ book was phenomenally successful because it introduced a new style of programming book, focused on a collection of guidelines that had been learned from real world experience of creating software in C++. Significantly, those guidelines were explained in the context of the reasons why they were necessary – allowing the reader to decide for themselves whether their particular scenario warranted breaking the rules.
Operation System
h
《编写 Rust 语言的操作系统》简体中文翻译
FFI
h
Given Rust's popularity and position as a systems programming language, you'll probably reach a point where you want to integrate a Rust module into some existing application. This guide was created to fill the current gap in knowledge when it comes to doing more in-depth FFI tasks than simply calling one or two functions from a C library.
h
Use autocxx if you have a large existing C++ codebase and you want to use its types and functions from Rust with maximal safety and minimal fuss.
Cargo
h
Cargo is the Rust package manager. Cargo downloads your Rust package’s dependencies, compiles your packages, makes distributable packages, and uploads them to crates.io, the Rust community’s package registry. You can contribute to this book on GitHub.
h
《Rust Cookbook 中文版》 翻译自 Cargo Book,查看此书的 Github 翻译项目。
WebAssembly
h
This book is for anyone interested in compiling Rust to WebAssembly for fast, reliable code on the Web. You should know some Rust, and be familiar with JavaScript, HTML, and CSS. You don't need to be an expert in any of them.
h
Writing A Wasm Runtime In Rust
Macros
h
This book is an attempt to distil the Rust community's collective knowledge of Rust macros. As such, both additions (in the form of pull requests) and requests (in the form of issues) are welcome.
h
The Little Book of Rust Macros (Updated) 中文翻译版【更新中】
h
Rust过程宏学习笔记
Asynchronous
h
Welcome to Asynchronous Programming in Rust! If you're looking to start writing asynchronous Rust code, you've come to the right place. Whether you're building a web server, a database, or an operating system, this book will show you how to use Rust's asynchronous programming tools to get the most out of your hardware.
h
This book serves as high-level documentation for async-std and a way of learning async programming in Rust through it. As such, it focuses on the async-std API and the task model it gives you.
h
This tutorial will take you step by step through the process of building a Redis client and server. We will start with the basics of asynchronous programing with Rust and build up from there. We will implement a subset of Redis commands but will get a comprehensive tour of Tokio.
h
欢迎使用Rust异步编程!如果你想开始编写Rust异步代码,那你找对地方了。无论你在构建Web服务器, 数据库还是操作系统,本书都会教你如何使用Rust的异步编程工具来榨干硬件性能
h
This book aims to explain green threads by using a small example where we implement a simple but working program where we use our own green threads to execute code.
h
Tokio 它是Rust语言的一种异步运行时 可以用来编写可靠,异步的Rust应用.
h
相比其他语言,Rust 的异步很有趣、很强大、很独特。而 Tokio 是 Rust 社区的一个非常流行的异步 runtime 实现,非常值得学习。本文会讲解 Tokio 的内部源码实现,以及一些精彩设计。
Embedded
h
Welcome to The Embedded Rust Book: An introductory book about using the Rust Programming Language on “Bare Metal” embedded systems, such as Microcontrollers.
h
Welcome to an overview of the documentation provided by the embedded Working Group. All of these projects are managed by the resources team.
h
The embedonomicon walks you through the process of creating a #![no_std] application from scratch and through the iterative process of building architecture-specific functionality for Cortex-M microcontrollers.
h
This is a tutorial series for hobby OS developers who are new to ARM's 64 bit ARMv8-A architecture. The tutorials will give a guided, step-by-step tour of how to write a monolithic Operating System kernel for an embedded system from scratch. They cover implementation of common Operating Systems tasks, like writing to the serial console, setting up virtual memory and handling HW exceptions. All while leveraging Rust's unique features to provide for safety and speed.
Advanced
h
This book is the primary reference for the Rust programming language. It provides three kinds of material:
- Chapters that informally describe each language construct and their use.
- Chapters that informally describe the memory model, concurrency model, runtime services, linkage model, and debugging facilities.
- Appendix chapters providing rationale and references to languages that influenced the design.
h
This guide is meant to help document how rustc – the Rust compiler – works, as well as to help new contributors get involved in rustc development.
h
h
The Rustonomicon digs into all the awful details that you need to understand when writing Unsafe Rust programs.
h
Welcome to the Unstable Book! This book consists of a number of chapters, each one organized by a “feature flag.” That is, when using an unstable feature of Rust, you must use a flag.
Command line
h
Documentation on how to use the Rust Programming Language to develop commandline applications
Serialization
h
Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.
Cheat Sheet
h
Contains clickable links to The Book BK, Rust by Example EX, Std Docs STD, Nomicon NOM, Reference REF. Other symbols used: largely deprecated 🗑️, has a minimum edition '18, is work in progress 🚧, or bad 🛑.
h
Basics - Rust cheat sheet
h
Since version 56, Firefox has had a new character encoding conversion library called encoding_rs. It is written in Rust and replaced the old C++ character encoding conversion library called uconv that dated from early 1999. Initially, all the callers of the character encoding conversion library were C++ code, so the new library, despite being written in Rust, needed to feel usable when used from C++ code. In fact, the library appears to C++ callers as a modern C++ library. Here are the patterns that I used to accomplish that.
h
…
Guide
h
Formatting code is a mostly mechanical task which takes both time and mental effort. By using an automatic formatting tool, a programmer is relieved of this task and can concentrate on more important things.
h
但随着对 Rust 越来越深入了解的过程中,我也逐渐发现这些工具的很多不足之处,覆盖的并不全面。比如 rustfmt 配置和使用不当会导致代码错误,而且无法识别 Rust 代码中各种命名的语义;clippy存在一些误报或lint不合理,以及无法覆盖到 Unsafe Rust 等问题。开发者,尤其是新手们,如果长期像使用一个黑盒一样去依赖rustfmt和clippy,但并不去了解其lint背后的原因,只是知其然而无法知其所以然,那在代码质量有一定要求的前提下是无法提升开发效率的。
h
This is a set of recommendations on how to design and present APIs for the Rust programming language. They are authored largely by the Rust library team, based on experiences building the Rust standard library and other crates in the Rust ecosystem.
h
This document describes the coding guidelines for the Libra Core Rust codebase.
h
Introduction, What is SIMD, History of SIMD in Rust
h
This document is produced by the UCG WG to provide a “guide” for writing unsafe code that “recommends” what kinds of things unsafe code can and cannot do, and that documents which guarantees unsafe code may rely on. It is largely a work-in-progress right now.
h
Rust is a multi-paradigm language with a focus on memory safety.
h
Rust 是一种静态编译的、运行速度快的语言,它拥有强大的工具,且其生态也在快速发展。 这使得它非常适合编写命令行应用:小巧、便携且运行速度快。 而命令行应用也是开始进行 Rust 学习,或向你的团队介绍 Rust 的一种很好的方式。
编写一个简单的命令行界面程序(CLI)对于刚接触 Rust 且希望对其有所了解的初学者来说, 是一个很好的练习。不过,这里面也包含了许多方面,后面我们会介绍到它们。
本书的大纲如下: 首先我们从一个快速教程开始,完成后你将得到一个可用的 CLI 工具。通过此教程, 你将接触到 RUST 的一些核心概念及 CLI 应用的主要包括了哪些部分功能。 而下面的章节则是介绍这些方面的实现细节。
h
chapter 1: Thread
Introduces Threads in std and concurrency libs.
chapter 2: Thread Pool
Introduces Thread pool for std thread.
chapter 3: async/await
Introduces async feature.
Performance
h
h
This book contains techniques that can improve the performance—speed and memory usage—of Rust programs. It also contains some techniques that will improve the compile times of Rust programs. Some of these techniques only require changing build configurations, but many require changing code.
Concurrency
h
h
t Rust原子和锁 zh-CNt p s : / / a t o m i c s . r s /
The Rust programming language is extremely well suited for concurrency, and its ecosystem has many libraries that include lots of concurrent data structures, locks, and more. But implementing those structures correctly can be difficult. Even in the most well-used libraries, memory ordering bugs are not uncommon.
Web
h
Actix user guides
h
actix-web 是 Rust 生态中的最为优秀的 web 框架之一,具有类型安全、功能丰富、扩展性强,以及速度极快的诸多优点。
h
Tide 是 Rust 生态中的最为优秀的 web 框架之一,具有类型安全、功能丰富、扩展性强,以及速度极快的诸多优点
Programming
h
In this book we will walk through the basics of interpreted language implementation in Rust with a focus on the challenges that are specifc to using Rust.
h
这系列文章介绍用Rust语言从零开始实现一个Lua解释器。
实现一个Lua解释器就很适合作为这个练习项目。因为其规模适中,足够涉及Rust的大部分基础特性而又不至于难以企及;目标明确,无需花费精力讨论需求;另外Lua语言本身也是一门设计优秀且应用广泛的语言,实现一个Lua解释器不仅可以实践Rust语言技能,还能深入了解Lua语言。
For Other Programmers
h
This is a (non-comprehensive) guide for C# and .NET developers that are completely new to the Rust programming language. Some concepts and constructs translate fairly well between C#/.NET and Rust, but which may be expressed differently, whereas others are a radical departure, like memory management. This guide provides a brief comparison and mapping of those constructs and concepts with concise examples.
h
Safe and Secure Coding in Rust Book
Others
h
r
A little book about Rust programming language in which are some data structures and algorithms plus some practice demos. This book contains 9 chapters.
h
All algorithms implemented in Rust (for educational purposes)
h
Welcome to the Rust Algorithm Club! This repository was originally inspired by Swift Algorithm Club. All algorithms here would be explained and implemented in Rust programming language! You can find out more on the Rust Algorithm Club main site. Just pick up some algorithms you are interested in and start learning. If you are brave enough, we recommend you the auto-generated API documentation. Go and fight with the source code.
h
A collection of classic data structures and algorithms, emphasizing usability, beauty and clarity over full generality. As such, this should be viewed not as a blackbox library, but as a whitebox cookbook demonstrating the design and implementation of algorithms. I hope it will be useful to students and educators, as well as fans of algorithmic programming contests.
h
This is the code repository for Hands-On Data Structures and Algorithms with Rust, published by Packt.
h
mdBook是一个命令行工具和Rust crate。可将Markdown文件创建为书籍。它与Gitbook非常相似,但用Rust编写.
h
Got any issues or want to check out all the final code at once? Everything's on Github!
h
This repo contains my notes on Rust programming language
Aggregation
h
Rust 官方文档翻译项目组提供了全面的学习 Rust 语言的官方文档和其他教程的中文知识库,从入门到深入学习 Rust 编程语言的各类资源,由 Rust 翻译项目组和其他参与 Rust 开源项目的爱好者共同提供。
h
This book is a treasure-trove of Rust books in mdbook format:
- Official books maintained at rust-lang.org
- Unofficial books maintained elsewhere
- Application books on specific Rust applications
- Books in Other Formats
h
泥芹,知识开源平台,帮助你选书、读书。
本网站基于 Rust web 技术栈构建。
h
Build Action for Rust Books List
GitHub: ht t p s : / / g i t h u b . c o m / c o n t a i n e r p i / r s d o c s - a c t i o n s
Reference
- h
t - Rust 文档网 - Rust 官方文档中文教程t p s : / / w w w . r u s t w i k i . o r g . c n / - h
t - Rust 中文资源t p s : / / g i t h u b . c o m / r u s t - l a n g - c n - h
t - BudsHome 书馆t p s : / / b o o k s . b u d s h o m e . c o m / - h
t - 国内的Rust书籍与学习资料t p s : / / g i t h u b . c o m / R u s t S t u d y / R u s t B o o k s C h i n a - h
t - Rust 资源索引t p s : / / g i t h u b . c o m / r u s t - c h i n a / h e l l o - r u s t - h
t - List of Rust bookst p s : / / g i t h u b . c o m / s g e r / R u s t B o o k s - h
t Understanding in Rustt p s : / / g i t h u b . c o m / 0 v o i c e / U n d e r s t a n d i n g _ i n _ R u s t - h
t - Rust Documentation Listt p s : / / r u s t w i k i . o r g / - h
t - Rust 技术论坛t p s : / / l e a r n k u . c o m / r u s t / d o c s - h
t - GitHub 上的一个 Rust 图书列表t p s : / / l e a r n k u . c o m / a r t i c l e s / 4 5 0 8 9 - h
t - async/await 如何工作 | Rust学习笔记t p s : / / m p . w e i x i n . q q . c o m / s / c U e - z f F p s U t X R W v i y X k h X A - h
t - 太赞了!Manning 出品的 Rust In Action 竟然可以免费阅读t p s : / / m p . w e i x i n . q q . c o m / s / j M X V e w E K n b j z T S V n 5 e w J x w - h
t - Rust中文宝典t p s : / / r u s t . i b y t e . m e / - h
t - The Rust Books Mirror [GitHub]t p s : / / o p e n d o c s . c o n t a i n e r p i . c o m / - h
t - 泥芹,知识开源平台,帮助你选书、读书t p s : / / n i q i n . c o m / z h - c n