内容简介

  Rust是一种新的系统编程语言,兼具C和C++的性能与底层控制,以及内存安全与线程安全。Rust的现代和灵活类型保证你的程序没有间接引用空指针、重复释放、迷途指针以及类似bug,都在编译时态,没有运行时开销。在多线程代码中,Rust在编译时捕获数据竞争,使得并行更易于使用。
  《Rust编程(影印版英文版)》由两位富有经验的系统程序员吉姆·布兰迪、詹森·奥兰多夫撰写,介绍了Ru5t如何兼顾性能和安全,以及怎样才能利用这个特性。

目录

Preface
1.WhyRust?
TypeSafety

2.ATourofRust
DownloadingandInstallingRust
ASimpleFunction
WritingandRunningUnitTests
HandlingCommand-LineArguments
ASimpleWebServer
Concurrency
WhattheMandelbrotSetActuallyIs
ParsingPairCommand-LineArguments
MappingfromPixelstoComplexNumbers
PlottingtheSet
WritingImageFiles
AConcurrentMandelbrotProgram
RunningtheMandelbrotPlotter
SafetyIsInvisible

3.BasicTvpes
MachineTypes
IntegerTypes
Floating-PointTypes
TheboolType
Characters
Tuples
PointerTypes
References
Boxes
RawPointers
Arrays,Vectors,andSlices
Arrays
Vectors
BuildingVectorsElementbyElement
Slices
StringTypes
StringLiterals
ByteStrings
StringsinMemory
String
UsingStrings
OtherString-LikeTypes
BeyondtheBasics

4.Ownership
Ownership
Moves
MoreOperationsThatMove
MovesandControlFlow
MovesandIndexedContent
CopyTypes:TheExceptiontoMoves
RcandArc:SharedOwnership

5.References
ReferencesasValues
RustReferencesVersusC++References
AssigningReferences
ReferencestoReferences
ComparingReferences
ReferencesAreNeverNull
BorrowingReferencestoArbitraryExpressions
ReferencestoSlicesandTraitObjects
ReferenceSafety
BorrowingaLocalVariable
ReceivingReferencesasParameters
PassingReferencesasArguments
ReturningReferences
StructsContainingReferences

6.Expressions
7.ErrorHanding
8.Cratesandmodules
9.Structs
10.Enumsandpatterns
11.Traitsandgenerics
12.Operatoroverloading
13.Utilitytraits
14Cloures
15.Iterators
16.Collections
17.Stringsandtext
18.InputandOutput
19.Concurrency
20.Nacros
21.Unsafecode
Index

其他推荐