Programming Rust

Programming Rust 下載 mobi epub pdf 電子書 2025

Jim Blandy
圖書標籤:
想要找書就要到 圖書大百科
立刻按 ctrl+D收藏本頁
你會得到大驚喜!!
Preface
1. Why Rust?
Type Safety
2. A Tour of Rust
Downloading and Installing Rust
A Simple Function
Writing and Running Unit Tests
Handling Command-Line Arguments
A Simple Web Server
Concurrency
3. Basic Types
Machine Types
Tuples
Pointer Types
Arrays, Vectors, and Slices
String Types
Beyond the Basics
4. Ownership
Ownership
Moves
Copy Types: The Exception to Moves
Rc and Arc: Shared Ownership
5. References
References as Values
Reference Safety
Sharing Versus Mutation
Taking Arms Against a Sea of Objects
6. Expressions
An Expression Language
Blocks and Semicolons
Declarations
if and match
Loops
return Expressions
Why Rust Has loop
Function and Method Calls
Fields and Elements
Reference Operators
Arithmetic, Bitwise, Comparison, and Logical Operators
Assignment
Type Casts
Closures
Precedence and Associativity
Onward
7. Error Handling
Panic
Result
8. Crates and Modules
Crates
Modules
Turning a Program into a Library
The src/bin Directory
Attributes
Tests and Documentation
Specifying Dependencies
Publishing Crates to crates.io
Workspaces
More Nice Things
9. Structs
Named-Field Structs
Tuple-Like Structs
Unit-Like Structs
Struct Layout
Defining Methods with impl
Generic Structs
Structs with Lifetime Parameters
Deriving Common Traits for Struct Types
Interior Mutability
10. Enums and Patterns
Enums
Patterns
The Big Picture
11. Traits and Generics
Using Traits
Defining and Implementing Traits
Fully Qualified Method Calls
Traits That Define Relationships Between Types
Reverse-Engineering Bounds
Conclusion
12. Operator Overloading
Arithmetic and Bitwise Operators
Equality Tests
Ordered Comparisons
Index and IndexMut
Other Operators
13. Utility Traits
Drop
Sized
Clone
Copy
Deref and DerefMut
Default
AsRef and AsMut
Borrow and BorrowMut
From and Into
ToOwned
Borrow and ToOwned at Work: The Humble Cow
14. Closures
Capturing Variables
Function and Closure Types
Closure Performance
Closures and Safety
Callbacks
Using Closures Effectively
15. Iterators
The Iterator and IntoIterator Traits
Creating Iterators
Iterator Adapters
Consuming Iterators
Implementing Your Own Iterators
16. Collections
Overview
Vec<T>
VecDeque<T>
LinkedList<T>
BinaryHeap<T>
HashMap<K, V> and BTreeMap<K, V>
HashSet<T> and BTreeSet<T>
Hashing
Beyond the Standard Collections
17. Strings and Text
Some Unicode Background
Characters (char)
String and str
Formatting Values
Regular Expressions
Normalization
18. Input and Output
Readers and Writers
Files and Directories
Networking
19. Concurrency
Fork-Join Parallelism
Channels
Shared Mutable State
What Hacking Concurrent Code in Rust Is Like
20. Macros
Macro Basics
Built-In Macros
Debugging Macros
The json! Macro
Avoiding Syntax Errors During Matching
Beyond macro_rules!
21. Unsafe Code
Unsafe from What?
Unsafe Blocks
Unsafe Functions
Unsafe Block or Unsafe Function?
Undefined Behavior
Unsafe Traits
Raw Pointers
Foreign Functions: Calling C and C++ from Rust
Conclusion
Index
· · · · · · (收起)

具體描述

This practical book introduces systems programmers to Rust, the new and cutting-edge language that’s still in the experimental/lab stage. You’ll learn how Rust offers the rare and valuable combination of statically verified memory safety and low-level control—imagine C++, but without dangling pointers, null pointer dereferences, leaks, or buffer overruns.

Author Jim Blandy—the maintainer of GNU Emacs and GNU Guile—demonstrates how Rust has the potential to be the first usable programming language that brings the benefits of an expressive modern type system to systems programming. Rust’s rules for borrowing, mutability, ownership, and moves versus copies will be unfamiliar to most systems programmers, but they’re key to Rust’s unique advantages.

This book presents Rust’s rules clearly and economically; elaborates on their consequences; and shows you how to express the programs you want to write in terms that Rust can prove are free of a broad class of common errors.

用戶評價

評分

當枕邊書讀完瞭,除瞭中間有些地方介紹API比較枯燥,對核心概念的講解、對不同做法的利弊分析都非常清晰,娓娓道來的風格讀起來也很舒服

評分

##講 trait 的地方能讓人感覺到 rust 是一個還沒設計完的語言。

評分

##我覺得最好的係統語言還是modern c++.

評分

##認真嚴肅的定期書友是學習的一大助力。。。

評分

##循序漸進,入門不錯。

評分

##循序漸進,入門不錯。

評分

##認真嚴肅的定期書友是學習的一大助力。。。

評分

##Rust 是一門係統編程語言,也是許多區塊鏈底層編程語言,不論是舊歡 Parity,還是新貴 Libra;不論是微軟還是 Linux 的核心開發者都對它青眼有加。 Rust 有一些很迷人的地方,比如:AOT,內存安全性,空指針安全性,還是豐富的類型係統,異或是龐大的社區生態。這些彆的語言也有,但是都沒有這麼徹底。 Rust 的特點也十分突齣,Ownership 和 borrow、references 還有 shadow,令人眼花繚亂,最最有趣的就是你寫一段程序,編譯器會 blame 你很多,你就感覺是在和編譯器搏鬥。 學習 Rust 不隻是一時興起(早在2015年我就聽聞過),也是一種擁抱變化的態度,重要的是可以讓你在看眾多區塊鏈代碼時不會那麼心慌。 語言的趨勢反映瞭未來的主流開發群體

評分

##比官方 doc 好

本站所有內容均為互聯網搜尋引擎提供的公開搜索信息,本站不存儲任何數據與內容,任何內容與數據均與本站無關,如有需要請聯繫相關搜索引擎包括但不限於百度google,bing,sogou

© 2025 book.teaonline.club All Rights Reserved. 圖書大百科 版權所有