Beginning Rust: Get Started with Rust 2021 Edition

Milanesi, Carlo

  • 出版商: Apress
  • 出版日期: 2021-12-16
  • 售價: $1,910
  • 貴賓價: 9.5$1,815
  • 語言: 英文
  • 頁數: 436
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484272072
  • ISBN-13: 9781484272077
  • 相關分類: Rust 語言
  • 海外代購書籍(需單獨結帳)



Learn to program with Rust 2021 Edition, in an easy, step-by-step manner on Unix, the Linux shell, macOS, and the Windows command line.  As you read this book, you’ll build on the knowledge you gained in previous chapters and see what Rust has to offer.   

Beginning Rust starts with the basics of Rust, including how to name objects, control execution flow, and handle primitive types. You’ll see how to do arithmetic, allocate memory, use iterators, and handle input/output. Once you have mastered these core skills, you’ll work on handling errors and using the object-oriented features of Rust to build robust Rust applications in no time.

Only a basic knowledge of programming in C or C++ and familiarity with a command console are required. After reading this book, you’ll be ready to build simple Rust applications.

What You Will Learn

- Get started programming with Rust
- Understand heterogeneous data structures and data sequences
- Define functions, generic functions, structs, and more
- Work with closures, changeable strings, ranges and slices

Use traits and learn about lifetimes  

Who This Book Is For 

Those who are new to Rust and who have at least some prior experience with programming in general: some C/C++ is recommended particularly.


以Unix、Linux shell、macOS和Windows命令行的方式,以簡單、逐步的方式學習Rust 2021 Edition的程式設計。當您閱讀本書時,您將在之前章節所獲得的知識基礎上進一步學習Rust的特點。

《Beginning Rust》從Rust的基礎知識開始,包括如何命名物件、控制執行流程和處理基本類型。您將學習如何進行算術運算、分配記憶體、使用迭代器和處理輸入/輸出。一旦掌握了這些核心技能,您將學習處理錯誤並使用Rust的面向對象特性,快速建立堅固的Rust應用程式。



- 開始使用Rust進行程式設計
- 理解異質資料結構和資料序列
- 定義函式、泛型函式、結構等
- 使用閉包、可變字串、範圍和切片
- 使用特性並了解生命週期



Carlo Milanesi is a professional software developer and expert who uses Rust. He has contributed to the Rust development community, and also has done web application development in Linux with PHP, JavaScript, Java, and the Ionic and Vaadin frameworks. Lastly, he has been in involved in these other technologies: GUI design, 2D and 3D rendering, testing automation, and database access. Carlo's applications include CAM/CAM for the stone machining industry, lens cutting laboratory automation, and corporate-wide web applications.


Carlo Milanesi 是一位專業的軟體開發人員和 Rust 專家。他曾經為 Rust 開發社群做出貢獻,並且在 Linux 上使用 PHP、JavaScript、Java 以及 Ionic 和 Vaadin 框架進行網頁應用程式開發。此外,他還涉獵其他技術,包括 GUI 設計、2D 和 3D 渲染、測試自動化以及資料庫存取。Carlo 的應用程式包括石材加工業的 CAM/CAM、鏡片切割實驗室自動化以及企業級網頁應用程式。


1. Introduction
2. Printing on Terminal
3. Doing Arithmatic
4. Naming Objects
5. Controlling Execution Flow
6. Using Data Sequences
7. Using Primitive Types
8. Enumerating Cases
9. Using Heterogeneous Data Structures
10. Defining Functions
11. Defining Generic Functions and Structs
12. Allocating Memory
13. Data Implementation
14. Defining Closures
15. Using Changeable Strings
16. Ranges and Slices
17. Using Iterators
18. Input/Output and Error Handling
19. Using Traits
20. Object-Oriented Programming
21. Standard Library Collections
22. Drops, Moves, and Copies
23. Borrowing and Lifetimes
24. More about Lifetimes


1. 簡介
2. 在終端機上列印
3. 進行算術運算
4. 命名物件
5. 控制執行流程
6. 使用資料序列
7. 使用原始類型
8. 列舉案例
9. 使用異質資料結構
10. 定義函式
11. 定義泛型函式和結構
12. 分配記憶體
13. 資料實作
14. 定義閉包
15. 使用可變字串
16. 範圍和切片
17. 使用迭代器
18. 輸入/輸出和錯誤處理
19. 使用特性
20. 物件導向程式設計
21. 標準程式庫集合
22. 丟棄、移動和複製
23. 借用和生命週期
24. 關於生命週期的更多資訊