Understanding#
Generally speaking, before deciding to learn a new language, one would first get a general understanding of the characteristics and current development status of the language. At this time, it is recommended to visit the Rust official website https://rust-lang.org
Rust Official Documentation#
Most of the learning or reference documents for the Rust language are listed on the Rust Learning Guide Page and Rust Official Documentation Homepage. Currently, the Rust official team has split the relevant documents into different repositories:
- 《The Rust Programming Language》, corresponding to the GitHub repository
- 《Rust by Example》, corresponding to the GitHub repository
- The Edition Guide, corresponding to the GitHub repository
- Cargo Documentation, corresponding to the GitHub repository source files
- rustdoc Documentation, corresponding to the GitHub repository source files
- rustc Documentation, corresponding to the GitHub repository source files
- Rust Compiler Error Index, corresponding to the GitHub repository source code
- 《The Rust Reference》, corresponding to the GitHub repository
- The Rustonomicon, corresponding to the GitHub repository
There are many other official or unofficial related documents:
- Writing Command Line Applications in Rust, corresponding to the GitHub repository
- Rust and WebAssembly Tutorial (WebAssembly Book), corresponding to the GitHub repository
- Embedded Rust Tutorial, corresponding to the GitHub repository
- A Rust Cookbook, corresponding to the GitHub repository
- The Unstable Book, corresponding to the GitHub repository source code
- rustc Guide - How the Rust Compiler Works and How to Contribute (rustc-guide), corresponding to the GitHub repository
- rustup Command Documentation, this translation project will translate the relevant instructions of
rustup
into Chinese - Rust RFC - Documents Related to Rust Development, corresponding to the GitHub repository
- mdBook User Manual, corresponding to the GitHub repository
- Rust API Guidelines, corresponding to the GitHub repository
- async-book, corresponding to the GitHub repository
Some of the source files of the above documents are located in subdirectories of the rust and cargo repositories: Rust Documentation and cargo Documentation.
Rust Resources#
Chinese resources related to Rust, including websites, or articles or books about Rust in China.
Chinese Websites Related to Rust#
Here are the currently collected Chinese websites for Rust:
Rust Language Chinese Community: https://rust.cc/
Rust Wiki: https://rustwiki.org/
English-Chinese Glossary of Rust Terminology#
👉 Some come from the English-Chinese Glossary of Rust repository, included here for the convenience of Rust learners to consult uniformly. If any errors or areas for improvement are found, please point out or correct them in the original repository.
English | Chinese | Note |
---|---|---|
A | ||
Abstract Syntax Tree | 抽象语法树 | |
ABI | 应用程序二进制接口 | Application Binary Interface abbreviation |
accumulator | 累加器 | |
accumulator variable | 累加器变量 | |
ahead-of-time compiled | 预编译 | |
ahead-of-time compiled language | 预编译语言 | |
alias | 别名 | |
aliasing | 别名使用 | See Wikipedia |
angle brackets | 尖括号,“<” 和 “>” | |
annotate | 标注,注明(动词) | |
annotation | 标注,注明(名词) | |
ARC | 原子引用计数器 | Atomic Reference Counter |
anonymity | 匿名 | |
argument | 参数,实参,实际参数 | Argument and parameter can be used interchangeably if not strictly distinguished |
argument type | 参数类型 | |
assignment | 赋值 | |
associated functions | 关联函数 | |
associated items | 关联项 | |
associated types | 关联类型 | |
asterisk | 星号(*) | |
atomic | 原子的 | |
attribute | 属性 | |
automated building | 自动构建 | |
automated test | 自动测试,自动化测试 | |
B | ||
baroque macro | 巴洛克宏 | |
benchmark | 基准 | |
binary | 二进制的 | |
binary executable | 二进制的可执行文件 | |
bind | 绑定 | |
block | 语句块,代码块 | |
boolean | 布尔型,布尔值 | |
borrow check | 借用检查 | |
borrower | 借用者,借入者 | |
borrowing | 借用 | |
bound | 约束,限定,限制 | This word is similar to constraint, constraint is translated as "约束" in C# |
box | 箱子,盒子,装箱类型 | Generally not translated, as a verb it means "to box", an ownership smart pointer |
boxed | 装箱,装包 | |
boxing | 装箱,装包 | |
brace | 大括号,“{” 或 “}” | |
buffer | 缓冲,缓冲区,缓冲器,缓存 | |
build | 构建 | |
builder pattern | 创建者模式 | |
C | ||
call | 调用 | |
caller | 调用者 | |
capacity | 容器 | |
capture | 捕获 | |
cargo | (Rust package manager, not translated) | As a noun, it means "cargo", as a verb, it means "to load cargo" |
cargo-fy | Cargo 化,使用 Cargo 创建项目 | |
case analysis | 事例分析 | |
cast | 类型转换,转型 | |
casting | 类型转换 | |
chaining method call | 链式方法调用 | |
channel | 信道,通道 | |
closure | 闭包 | |
coercion | 强制类型转换,强制转换 | Coercion originally means "force, coercion" |
collection | 集合 | See Wikipedia |
combinator | 组合算子,组合器 | |
comma | 逗号,“,” | |
command | 命令 | |
command line | 命令行 | |
comment | 注释 | |
compile | 编译(动词) | |
compile time | 编译期,编译期间,编译时 | |
compilation | 编译(名词) | |
compilation unit | 编译单元 | |
compiler | 编译器 | |
compiler intrinsics | 编译器固有功能 | |
compound | 复合(类型,数据) | |
concurrency | 并发 | |
conditional compilation | 条件编译 | |
configuration | 配置 | |
constructor | 构造器 | |
consumer | 消费者 | |
container | 容器 | |
container type | 容器类型 | |
convert | 转换,转化,转 | |
copy | 复制,拷贝 | |
crate | 包,包装箱,装包 | Generally not translated, crate is the basic compilation unit of Rust |
curly braces | 大括号,包含 “{” 和 “}” | |
custom type | 自定义类型 | |
D | ||
dangling pointer | 悬垂指针 | use after free |
data race | 数据竞争 | |
dead code | 死代码,无效代码,不可达代码 | |
deallocate | 释放,重新分配 | |
declare | 声明 | |
deep copy | 深拷贝,深复制 | |
dependency | 依赖 | |
deref coercions | 强制多态 | |
dereference | 解引用 | Sometimes abbreviated as Deref in Rust articles |
derive | 派生 | |
designator | 指示符 | |
destruction | 销毁,毁灭 | |
destructor | 析构器,析构函数 | |
destructure | 解构 | |
destructuring | 解构,解构赋值 | |
desugar | 脱糖 | |
diverge function | 发散函数 | |
device drive | 设备驱动 | |
directory | 目录 | |
dispatch | 分发 | |
diverging functions | 发散函数 | |
documentation | 文档 | |
dot operator | 点运算符 | |
DST | 动态大小类型 | dynamic sized type, generally not translated, use the English abbreviation |
dynamic language | 动态类型语言 | |
dynamic trait type | 动态特质类型 | |
E | ||
enumeration | 枚举 | |
encapsulation | 封装 | |
equality test | 相等测试 | |
elision | 省略 | |
exhaustiveness checking | 穷尽性检查,无遗漏检查 | |
expression | 表达式 | |
expression-oriented language | 面向表达式的语言 | |
explicit | 显式 | |
explicit discriminator | 显式的辨别值 | |
explicit type conversion | 显式类型转换 | |
extension | 扩展名 | |
extern | 外,外部 | Not translated when used as a keyword |
F | ||
fat pointer | 胖指针 | |
feature gate | 功能开关 | |
field | 字段 | |
field-level mutability | 字段级别可变性 | |
file | 文件 | |
fmt | 格式化,是 format 的缩写 | |
formatter | 格式化程序,格式化工具,格式器 | |
floating-point number | 浮点数 | |
flow control | 流程控制 | |
Foreign Function Interface (FFI) | 外部语言函数接口 | |
fragment specifier | 片段分类符 | |
free variables | 自由变量 | |
freeze | 冻结 | |
function | 函数 | |
function declaration | 函数声明 | |
functional | 函数式 | |
G | ||
garbage collector | 垃圾回收 | |
generalize | 泛化,泛型化 | |
generator | 生成器 | |
generic | 泛型 | |
generic type | 泛型类型 | |
growable | 可增长的 | |
guard | 守卫 | |
H | ||
handle error | 句柄错误 | |
hash | 哈希,哈希值,散列 | |
hash map | 散列映射,哈希表 | |
heap | 堆 | |
hierarchy | 层次,分层,层次结构 | |
higher rank lifetime | 高阶生命周期 | |
higher rank trait bound | 高阶特质约束 | |
higher tank type | 高阶类型 | |
hygiene | 卫生 | |
hygienic macro system | 卫生宏系统 | |
I | ||
ICE | 编译内部错误 | internal compiler error abbreviation |
immutable | 不可变的 | |
implement | 实现 | |
implementor | 实现者 | |
implicit | 隐式 | |
implicit discriminator | 隐式的辨别值 | |
implicit type conversion | 隐式类型转换 | |
import | 导入 | |
in assignment | 在赋值(语句) | |
index | 索引 | English plural form: indices |
infer | 推导(动词) | |
inference | 推导(名词) | |
inherited mutability | 承袭可变性 | |
inheritance | 继承 | |
integrated development environment (IDE) | 集成开发环境 | Usually written as IDE in Chinese literature |
integration-style test | 集成测试 | |
interior mutability | 内部可变性 | |
installer | 安装程序,安装器 | |
instance | 实例 | |
instance method | 实例方法 | |
integer | 整型,整数 | |
interact | 相互作用,相互影响 | |
interior mutability | 内部可变性 | |
intrinsic | 固有的 | |
invoke | 调用 | |
item | 项,条目,项目 | |
iterate | 重复 | |
iteration | 迭代 | |
iterator | 迭代器 | |
iterator adaptors | 迭代器适配器 | |
iterator invalidation | 迭代器失效 | |
L | ||
LHS | 左操作数 | informal abbreviation of left-hand side, opposite of RHS |
lender | 借出者 | |
library | 库 | |
lifetime | 生存时间,寿命,生命周期 | |
lifetime elision | 生命周期省略 | |
link | 链接 | |
linked-list | 链表 | |
lint | (不译) | Lint literally means "lint, fluff", this word in computer science refers to suspicious and unstructured fragments of program code, see Wikipedia |
list | 列表 | |
listener | 监听器 | |
literal | 数据,常量数据,字面值,字面量, 字面常量,字面上的 | Literal means: literal meaning (content) |
LLVM | (不译) | Low Level Virtual Machine abbreviation, a system for building compilers |
loop | 循环 | Not translated when used as a keyword |
low-level code | 底层代码 | |
low-level language | 底层语言 | |
l-value | 左值 | |
M | ||
main function | main 函数,主函数 | |
macro | 宏 | |
map | 映射 | Generally not translated |
match guard | 匹配守卫 | |
memory | 内存 | |
memory leak | 内存泄露 | |
memory safe | 内存安全 | |
meta | 原则,元 | |
metadata | 元数据 | |
metaprogramming | 元编程 | |
metavariable | 元变量 | |
method call syntax | 方法调用语法 | |
method chaining | 方法链 | |
method definition | 方法定义 | |
modifier | 修饰符 | |
module | 模块 | |
monomorphization | 单态 | mono: one, morph: form |
move | 移动,转移 | According to Rust's specification, the English word transfer is more fitting than move Reference: Rust by Example |
move semantics | 移动语义 | |
mutability | 可变性 | |
mutable | 可变 | |
mutable reference | 可变引用 | |
multiple bounds | 多重约束 | |
mutiple patterns | 多重模式 | |
N | ||
nest | 嵌套 | |
Nightly Rust | Rust 开发版 | nightly literally means "every night", referring to code updates daily |
NLL | 非词法生命周期 | non lexical lifetime abbreviation, generally not translated |
non-copy type | 非复制类型 | |
non-generic | 非泛型 | |
no-op | 空操作,空运算 | (This term appears in the type conversion chapter) |
non-commutative | 非交换的 | |
non-scalar cast | 非标量转换 | |
notation | 符号,记号 | |
numeric | 数值,数字 | |
O | ||
optimization | 优化 | |
out-of-bounds accessing | 越界访问 | |
orphan rule | 孤儿规则 | |
overflow | 溢出,越界 | |
own | 占有,拥有 | |
owner | 所有者,拥有者 | |
ownership | 所有权 | |
P | ||
package manager | 包管理器,软件包管理器 | |
panic | (不译) | This word translates directly to "panic", used in Rust for unrecoverable error handling |
parameter | 参量,形参,形式参量 | Argument and parameter can be used interchangeably if not strictly distinguished |
parametric polymorphism | 参数多态 | |
parent scope | 父级作用域 | |
parentheses | 小括号,包括 “(” 和 “)” | |
parse | 分析,解析 | |
parser | (语法)分析器,解析器 | |
pattern | 模式 | |
pattern match | 模式匹配 | |
phantom type | 虚类型,虚位类型 | Related proprietary terms: phantom bug, phantom power See: Haskell, Haskell/Phantom_type, Rust/Phantom, stdlib/PhantomData |
platform | 平台 | |
polymorphism | 多态 | |
powershell | (不译) | A command-line shell and scripting environment in Windows |
possibility of absence | 不存在的可能性 | |
precede | 预先?,在... 发生(或出现) | |
prelude | (不译) | Pre-imported module, literally means: overture, prelude |
primitive types | 原生类型,基本类型,简单类型 | |
打印 | ||
process | 进程 | |
procedural macros | 过程宏,程序宏 | |
project | 项目,工程 | |
prototype | 原型 | |
R | ||
race condition | 竞态条件 | |
RAII | 资源获取即初始化(一般不译) | resource acquisition is initialization abbreviation |
range | 区间,范围 | |
range expression | 区间表达式 | |
raw identifier | 原始标识符 | |
raw pointer | 原始指针,裸指针 | |
RC | 引用计数 | reference counted |
Reader | 读取器 | |
recursive macro | 递归宏 | |
reference | 引用 | |
reference cycle | 引用循环 | |
release | 发布 | |
resource | 资源 | |
resource leak | 资源泄露 | |
RHS | 右操作数 | informal abbreviation of right-hand side, opposite of LHS |
root directory | 根目录 | |
runtime | 运行时 | |
runtime behavior | 运行时行为 | |
runtime overhead | 运行时开销 | |
Rust | (不译) | A programming language |
Rustacean | (不译) | A general term for programmers or enthusiasts who write Rust |
rustc | (不译) | Rust language compiler |
r-value | 右值 | |
S | ||
scalar | 标量,数量 | |
schedule | 调度 | |
scope | 作用域 | |
screen | 屏幕 | |
script | 脚本 | |
semicolon | 分号,“;” | |
self | 自身,作关键字时不译 | |
shadow | 遮蔽,隐蔽,隐藏,覆盖 | |
shallow copy | 浅拷贝,浅复制 | |
signature | 标记 | |
slice | 切片 | |
snake case | 蛇形命名 | See: Snake case |
source file | 源文件 | |
source code | 源代码 | |
specialization | 泛型特化 | |
square | 平方,二次方,二次幂 | |
square brackets | 中括号,“[” 和 “]” | |
src | (不译) | Abbreviation for source, referring to source code |
stack | 栈 | |
stack unwind | 栈解开、栈展开 | |
statement | 语句 | |
statically allocated | 静态分配 | |
statically allocated string | 静态分配的字符串 | |
statically dispatch | 静态分发 | |
static method | 静态方法 | |
string | 字符串 | |
string literal | 字符串常量 | |
string slices | 字符串片段 | |
stringify | 字符串化 | |
subscript notation | 下标 | |
sugar | 糖 | |
super | 父级,作关键字时不译 | |
syntax context | 语法上下文 | |
systems programming language | 系统级编程语言 | |
T | ||
tagged union | 标记联合 | |
target triple | 多层次指标,三层 / 重 指标 / 目标 | triple literally means "three", but here refers to "multiple", this term requires more discussion for translation |
terminal | 终端 | |
testing | 测试 | |
testsuit | 测试套件 | |
the least significant bit (LSB) | 最低数字位 | |
the most significant bit (MSB) | 最高数字位 | |
thread | 线程 | |
TOML | (不译) | Tom's Obvious, Minimal Language abbreviation, a configuration language |
token tree | 令牌树? | To be further considered |
trait | 特质 | Literally means "characteristic, feature" |
trait bound | 特质约束 | Bound means "constraint, limit" |
trait object | 特质对象 | |
transmute | (不译) | Literally means "change, transform, mutate", not translated |
trivial | 平凡的 | |
troubleshooting | 疑难解答,故障诊断, 故障排除,故障分析 | |
tuple | 元组 | |
two's complement | 补码,二补数 | |
two-word object | 双字对象 | |
type annotation | 类型标注 | |
type erasure | 类型擦除 | |
type inference | 类型推导 | |
type inference engine | 类型推导引擎 | |
type parameter | 类型参量 | |
type placeholder | 类型占位符 | |
type signature | 类型标记 | |
U | ||
undefined behavior | 未定义行为 | |
uninstall | 卸载 | |
unit-like struct | 类单元结构体 | |
unit struct | 单元结构体 | |
"unit-style" tests | 单元测试 | |
unit test | 单元测试 | |
unit type | 单元类型 | |
universal function call syntax (UFCS) | 通用函数调用语法 | |
unsized types | 不定长类型 | |
unwind | 展开 | |
unwrap | 解包 | Tentative translation! |
V | ||
variable binding | 变量绑定 | |
variable shadowing | 变量遮蔽,变量隐蔽, 变量隐藏,变量覆盖 | |
variable capture | 变量捕获 | |
variant | 变量 | |
vector | (动态数组,一般不译) | Vector literally means "vector" |
visibility | 可见性 | |
vtable | 虚表 | |
W | ||
where clause | where 子句,where 从句,where 分句 | Often translated as "clause" in official database manuals, translated as "从句" in English grammar |
wrap | 包裹 | Tentative translation! |
wrapped | 装包 | |
wrapper | 装包 | |
Y | ||
yield | 产生 (收益、效益等),产出,提供 | |
Z | ||
zero-cost abstractions | 零开销抽象 | |
zero-width space (ZWSP) | 零宽空格 |