Rust编程 第2版(影印版)
Jim Blandy, Jason Orendorff, Leonora Tindall
出版时间:2022年09月
页数:711
“对于具有其他系统编程语言经验的人来说,本书会让你很快熟悉Rust。作者通过大量代码示例和项目阐明了Rust的工作原理。”
一Carol Nichols
《The Rust Programming Language》合著者,Integer 32, LLC的联合创始人

系统编程为全世界的计算提供了基础。开发性能敏感代码需要一种编程语言,能够让程序员掌控内存、处理器时间以及其他系统资源。Rust系统编程语言将这种控制力与现代类型的系统相结合,可以捕捉到从内存管理错误到线程间数据竞争等各种常见的错误。
通过这本实用指南,有经验的系统程序员将学会如何成功地使用 Rust弥合性能和安全之间的差距。Jim Blandy、Jason Orendorff和 Leonora Tindall展示了Rust的特性如何通过将可预测的性能与内存安全和可信赖的并发性结合起来,使程序员得以控制内存消耗和处理器的使用。
本书探讨了:
● Rust的基本数据类型以及所有权和借用的核心概念
● 语言基础知识,包括错误处理、箱(crates)、模块、结构体和枚举
● 如何使用特质和泛型编写灵活高效的代码
● Rust的关键工具:闭包、迭代器和异步编程
● 集合、字符串和文本、输入和输出、并发、宏、不安全代码以及外部函数接口
  1. Preface
  2. 1. Systems Programmers Can Have Nice Things
  3. Rust Shoulders the Load for You
  4. Parallel Programming Is Tamed
  5. And Yet Rust Is Still Fast
  6. Rust Makes Collaboration Easier
  7. 2. A Tour of Rust
  8. rustup and Cargo
  9. Rust Functions
  10. Writing and Running Unit Tests
  11. Handling Command-Line Arguments
  12. Serving Pages to the Web
  13. Concurrency
  14. Filesystems and Command-Line Tools
  15. 3. Fundamental Types
  16. Fixed-Width Numeric Types
  17. The bool Type
  18. Characters
  19. Tuples
  20. Pointer Types
  21. Arrays, Vectors, and Slices
  22. String Types
  23. Type Aliases
  24. Beyond the Basics
  25. 4. Ownership and Moves
  26. Ownership
  27. Moves
  28. Copy Types: The Exception to Moves
  29. Rc and Arc: Shared Ownership
  30. 5. References
  31. References to Values
  32. Working with References
  33. Reference Safety
  34. Sharing Versus Mutation
  35. Taking Arms Against a Sea of Objects
  36. 6. Expressions
  37. An Expression Language
  38. Precedence and Associativity
  39. Blocks and Semicolons
  40. Declarations
  41. if and match
  42. if let
  43. Loops
  44. Control Flow in Loops
  45. return Expressions
  46. Why Rust Has loop
  47. Function and Method Calls
  48. Fields and Elements
  49. Reference Operators
  50. Arithmetic, Bitwise, Comparison, and Logical Operators
  51. Assignment
  52. Type Casts
  53. Closures
  54. Onward
  55. 7. Error Handling
  56. Panic
  57. Result
  58. 8. Crates and Modules
  59. Crates
  60. Modules
  61. Turning a Program into a Library
  62. The src/bin Directory
  63. Attributes
  64. Tests and Documentation
  65. Specifying Dependencies
  66. Publishing Crates to crates.io
  67. Workspaces
  68. More Nice Things
  69. 9. Structs
  70. Named-Field Structs
  71. Tuple-Like Structs
  72. Unit-Like Structs
  73. Struct Layout
  74. Defining Methods with impl
  75. Associated Consts
  76. Generic Structs
  77. Structs with Lifetime Parameters
  78. Deriving Common Traits for Struct Types
  79. Interior Mutability
  80. 10. Enums and Patterns
  81. Enums
  82. Patterns
  83. The Big Picture
  84. 11. Traits and Generics
  85. Using Traits
  86. Defining and Implementing Traits
  87. Fully Qualified Method Calls
  88. Traits That Define Relationships Between Types
  89. Reverse-Engineering Bounds
  90. Traits as a Foundation
  91. 12. Operator Overloading
  92. Arithmetic and Bitwise Operators
  93. Equivalence Comparisons
  94. Ordered Comparisons
  95. Index and IndexMut
  96. Other Operators
  97. 13. Utility Traits
  98. Drop
  99. Sized
  100. Clone
  101. Copy
  102. Deref and DerefMut
  103. Default
  104. AsRef and AsMut
  105. Borrow and BorrowMut
  106. From and Into
  107. TryFrom and TryInto
  108. ToOwned
  109. Borrow and ToOwned at Work: The Humble Cow
  110. 14. Closures
  111. Capturing Variables
  112. Function and Closure Types
  113. Closure Performance
  114. Closures and Safety
  115. Callbacks
  116. Using Closures Effectively
  117. 15. Iterators
  118. The Iterator and IntoIterator Traits
  119. Creating Iterators
  120. Iterator Adapters
  121. Consuming Iterators
  122. Implementing Your Own Iterators
  123. 16. Collections
  124. Overview
  125. Vec<T>
  126. VecDeque<T>
  127. BinaryHeap<T>
  128. HashMap<K, V> and BTreeMap<K, V>
  129. HashSet<T> and BTreeSet<T>
  130. Hashing
  131. Using a Custom Hashing Algorithm
  132. Beyond the Standard Collections
  133. 17. Strings and Text
  134. Some Unicode Background
  135. Characters (char)
  136. String and str
  137. Formatting Values
  138. Regular Expressions
  139. Normalization
  140. 18. Input and Output
  141. Readers and Writers
  142. Files and Directories
  143. Networking
  144. 19. Concurrency
  145. Fork-Join Parallelism
  146. Channels
  147. Shared Mutable State
  148. What Hacking Concurrent Code in Rust Is Like
  149. 20. Asynchronous Programming
  150. From Synchronous to Asynchronous
  151. An Asynchronous Client and Server
  152. Primitive Futures and Executors: When Is a Future Worth Polling Again?
  153. Pinning
  154. When Is Asynchronous Code Helpful?
  155. 21. Macros
  156. Macro Basics
  157. Built-In Macros
  158. Debugging Macros
  159. Building the json! Macro
  160. Avoiding Syntax Errors During Matching
  161. Beyond macro_rules!
  162. 22. Unsafe Code
  163. Unsafe from What?
  164. Unsafe Blocks
  165. Example: An Efficient ASCII String Type
  166. Unsafe Functions
  167. Unsafe Block or Unsafe Function?
  168. Undefined Behavior
  169. Unsafe Traits
  170. Raw Pointers
  171. Reinterpreting Memory with Unions
  172. Matching Unions
  173. Borrowing Unions
  174. 23. Foreign Functions
  175. Finding Common Data Representations
  176. Declaring Foreign Functions and Variables
  177. Using Functions from Libraries
  178. A Raw Interface to libgit2
  179. A Safe Interface to libgit2
  180. Conclusion
  181. Index
书名:Rust编程 第2版(影印版)
国内出版社:东南大学出版社
出版时间:2022年09月
页数:711
书号:978-7-5766-0223-4
原版书书名:Programming Rust, 2e
原版书出版商:O'Reilly Media
Jim Blandy
 
Jim Blandy,Mozilla软件工程师,拥有近40年编程经验和30年自由软件开发经验,是Subversion版本控制系统最初的设计者之一,曾在GNU Emacs、GNU Debugger等项目上工作。
 
 
Jason Orendorff
 
Jason Orendorff,GitHub工程师,专注开发尚未公开的Rust项目,曾在Mozilla参与Java Script引擎SpiderMonkey的开发。兴趣广泛,包括:语法学、烘焙、时间旅行,以及帮助人们理解复杂主题。
 
 
Leonora Tindall
 
Leonora Tindall是一名类型系统爱好者和软件工程师,他使用Rust、 Elixir和其他高级语言在医疗保健和数据所有权等影响力较大的领域构建稳健且有弹性的系统软件。
 
 
The animal on the cover of Programming Rust is a Montagu’s crab (Xantho hydrophilus). Montagu’s crab has been found in the northeastern Atlantic Ocean and in the Mediterranean Sea. It lives under rocks and boulders during low tide. If one is exposed when a rock is lifted, it will aggressively hold its pincers up and spread them wide open to make itself appear bigger.
This robust-looking crab has a muscly appearance with a broad carapace about 70 mm wide. The edge of the carapace is furrowed, and the color is yellowish or reddishbrown. It has 10 legs: the front pair (the chelipeds) are equal in size with black-tipped claws or pincers; then there are three pairs of walking legs that are stout and relatively
short; and the last pair of legs are for swimming. They walk and swim sideways.
This crab is an omnivore. They eat mostly algae, snails, and crabs of other species. They are mostly active at night. Egg-bearing females are found from March through July, and the larvae are present in plankton for most of the summer.
Many of the animals on O’Reilly covers are endangered; all of them are important to the world.
购买选项
定价:188.00元
书号:978-7-5766-0223-4
出版社:东南大学出版社