baicai

白菜

一个勤奋的代码搬运工!

Rust 学习指南

了解#

一般来说,要决定学习一门新语言之前,会先大体了解下这门语言的特点和目前的发展情况。
这时,建议看 Rust 官网 https://rust-lang.org

Rust 官方文档#

Rust 语言的学习或参考文档大都列在 Rust 学习指引页Rust 官方文档主页 上,目前 Rust 官方团队已经将相关文档拆分到不同的仓库上:

还有其他更多官方或其他非官方相关的文档:

上述文档的源文件有些是放在 rustcargo 的仓库的子目录中:Rust 文档cargo 文档

Rust 资源#

Rust 相关的中文资源,包括网站,或者国内的 Rust 的文章或书籍。

Rust 相关的中文网站#

以下列出目前搜集到的 Rust 中文网站:

Rust 语言中文社区:https://rust.cc/

Rust Wiki 网:https://rustwiki.org/

Rust 语言术语中英文对照表#

👉 部分来自 Rust 语言术语中英文对照表仓库,收录在此处,只是方便 Rust 学习者统一查阅,若是发现有任何错误或需要完善地方,请在原仓库指出或修改错误。

English 英文Chinese 中文Note 备注
A
Abstract Syntax Tree抽象语法树
ABI应用程序二进制接口Application Binary Interface 缩写
accumulator累加器
accumulator variable累加器变量
ahead-of-time compiled预编译
ahead-of-time compiled language预编译语言
alias别名
aliasing别名使用参见 Wikipedia
angle brackets尖括号,“<” 和 “>”
annotate标注,注明(动词)
annotation标注,注明(名词)
ARC原子引用计数器Atomic Referecne Counter
anonymity匿名
argument参数,实参,实际参数不严格区分的话, argument(参数)和
parameter(参量)可以互换地使用
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约束,限定,限制此词和 constraint 意思相近,
constraint 在 C# 语言中翻译成 “约束”
box箱子,盒子,装箱类型一般不译,作动词时翻译成 “装箱”,
具有所有权的智能指针
boxed装箱,装包
boxing装箱,装包
brace大括号,“{” 或 “}”
buffer缓冲,缓冲区,缓冲器,缓存
build构建
builder pattern创建者模式
C
call调用
caller调用者
capacity容器
capture捕获
cargo(Rust 包管理器,不译)该词作名词时意思是 “货物”,
作动词时意思是 “装载货物”
cargo-fyCargo 化,使用 Cargo 创建项目
case analysis事例分析
cast类型转换,转型
casting类型转换
chaining method call链式方法调用
channel信道,通道
closure闭包
coercion强制类型转换,强制转换coercion 原意是 “强制,胁迫”
collection集合参见 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包,包装箱,装包一般不译,crate 是 Rust 的基本编译单元
curly braces大括号,包含 “{” 和 “}”
custom type自定义类型
D
dangling pointer悬垂指针use after free 在释放后使用
data race数据竞争
dead code死代码,无效代码,不可达代码
deallocate释放,重新分配
declare声明
deep copy深拷贝,深复制
dependency依赖
deref coercions强制多态
dereference解引用Rust 文章中有时简写为 Deref
derive派生
designator指示符
destruction销毁,毁灭
destructor析构器,析构函数
destructure解构
destructuring解构,解构赋值
desugar脱糖
diverge function发散函数
device drive设备驱动
directory目录
dispatch分发
diverging functions发散函数
documentation文档
dot operator点运算符
DST动态大小类型dynamic sized type,一般不译,
使用英文缩写形式
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外,外部作关键字时不译
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 comppiler error 的缩写
immutable不可变的
implement实现
implementor实现者
implicit隐式
implicit discriminator隐式的辨别值
implicit type conversion隐式类型转换
import导入
in assignment在赋值(语句)
index索引英语复数形式:indices
infer推导(动词)
inference推导(名词)
inherited mutability承袭可变性
inheritance继承
integrated development
environment(IDE)
集成开发环境中文著作中通常直接写成 IDE
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左操作数left-hand side 的非正式缩写,
与 RHS 相对
lender借出者
library
lifetime生存时间,寿命,生命周期
lifetime elision生命周期省略
link链接
linked-list链表
lint(不译)lint 英文本义是 “纱布,绒毛”,此词在
计算机领域中表示程序代码中可疑和
不具结构性的片段,参见 Wikipedia
list列表
listener监听器
literal数据,常量数据,字面值,字面量,
字面常量,字面上的
英文意思:字面意义的(内容)
LLVM(不译)Low Level Virtual Machine 的缩写,
是构建编译器的系统
loop循环作关键字时不译
low-level code底层代码
low-level language底层语言
l-value左值
M
main functionmain 函数,主函数
macro
map映射一般不译
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移动,转移按照 Rust 所规定的内容,
英语单词 transfer 的意思
比 move 更贴合实际描述
参考:Rust by Example
move semantics移动语义
mutability可变性
mutable可变
mutable reference可变引用
multiple bounds多重约束
mutiple patterns多重模式
N
nest嵌套
Nightly RustRust 开发版nightly 本意是 “每夜,每天晚上”,
指代码每天都更新
NLL非词法生命周期non lexical lifetime 的缩写,
一般不译
non-copy type非复制类型
non-generic非泛型
no-op空操作,空运算(此词出现在类型转换章节中)
non-commutative非交换的
non-scalar cast非标量转换
notation符号,记号
numeric数值,数字
O
optimization优化
out-of-bounds accessing越界访问
orphan rule孤儿规则
overflow溢出,越界
own占有,拥有
owner所有者,拥有者
ownership所有权
P
package manager包管理器,软件包管理器
panic(不译)此单词直接翻译是 “恐慌”,
在 Rust 中用于不可恢复的错误处理
parameter参量,形参,形式参量不严格区分的话, argument(参数)和
parameter(参量)可以互换地使用
parametric polymorphism参数多态
parent scope父级作用域
parentheses小括号,包括 “(” 和 “)”
parse分析,解析
parser(语法)分析器,解析器
pattern模式
pattern match模式匹配
phantom type虚类型,虚位类型phantom 相关的专有名词:
phantom bug 幻影指令
phantom power 幻象电源
参见:HaskellHaskell/Phantom_type
Rust/Phantomstdlib/PhantomData
platform平台
polymorphism多态
powershell(不译)Windows 系统的一种命令行外壳程序
和脚本环境
possibility of absence不存在的可能性
precede预先?,在... 发生(或出现)
prelude(不译)预先导入模块,英文本意:序曲,前奏
primitive types原生类型,基本类型,简单类型
print打印
process进程
procedural macros过程宏,程序宏
project项目,工程
prototype原型
R
race condition竞态条件
RAII资源获取即初始化(一般不译)resource acquisition is initialization 的缩写
range区间,范围
range expression区间表达式
raw identifier原始标识符
raw pointer原始指针,裸指针
RC引用计数reference counted
Reader读取器
recursive macro递归宏
reference引用
reference cycle引用循环
release发布
resource资源
resource leak资源泄露
RHS右操作数right-hand side 的非正式缩写,
与 LHS 相对
root directory根目录
runtime运行时
runtime behavior运行时行为
runtime overhead运行时开销
Rust(不译)一种编程语言
Rustacean(不译)编写 Rust 的程序员或爱好者的通称
rustc(不译)Rust 语言编译器
r-value右值
S
scalar标量,数量
schedule调度
scope作用域
screen屏幕
script脚本
semicolon分号,“;”
self自身,作关键字时不译
shadow遮蔽,隐蔽,隐藏,覆盖
shallow copy浅拷贝,浅复制
signature标记
slice切片
snake case蛇形命名参见:Snake case
source file源文件
source code源代码
specialization泛型特化
square平方,二次方,二次幂
square brackets中括号,“[” 和 “]”
src(不译)source 的缩写,指源代码
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 本义是 “三”,但此处虚指 “多”,
此词翻译需要更多讨论
terminal终端
testing测试
testsuit测试套件
the least significant bit (LSB)最低数字位
the most significant bit (MSB)最高数字位
thread线程
TOML(不译)Tom's Obvious, Minimal Language
的缩写,一种配置语言
token tree令牌树?待进一步斟酌
trait特质其字面上有 “特性,特征” 之意
trait bound特质约束bound 有 “约束,限制,限定” 之意
trait object特质对象
transmute(不译)其字面上有 “变化,变形,变异” 之意,
不作翻译
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解包暂译!
V
variable binding变量绑定
variable shadowing变量遮蔽,变量隐蔽,
变量隐藏,变量覆盖
variable capture变量捕获
variant变量
vector(动态数组,一般不译)vector 本义是 “向量”
visibility可见性
vtable虚表
W
where clausewhere 子句,where 从句,where 分句在数据库的官方手册中多翻译成 “子句”,英语语法中翻译成 “从句”
wrap包裹暂译!
wrapped装包
wrapper装包
Y
yield产生 (收益、效益等),产出,提供
Z
zero-cost abstractions零开销抽象
zero-width space(ZWSP)零宽空格
加载中...
此文章数据所有权由区块链加密技术和智能合约保障仅归创作者所有。