书籍 Rust for Rustaceans: Idiomatic Programming for Experienced Developers的封面

Rust for Rustaceans: Idiomatic Programming for Experienced Developers

Jon Gjengset

出版时间

2021-11-16

ISBN

9781718501850

评分

★★★★★
书籍介绍

For developers who’ve mastered the basics, this book is the next step on your way to professional-level programming in Rust. It covers everything you need to build and maintain larger code bases, write powerful and flexible applications and libraries, and confidently expand the scope and complexity of your projects.

Author Jon Gjengset takes you deep into the Rust programming language, dissecting core topics like ownership, traits, concurrency, and unsafe code. You’ll explore key concepts like type layout and trait coherence, delve into the inner workings of concurrent programming and asynchrony with async/await, and take a tour of the world of no_std programming. Gjengset also provides expert guidance on API design, testing strategies, and error handling, and will help develop your understanding of foreign function interfaces, object safety, procedural macros, and much more.

You'll Learn:

• How to design reliable, idiomatic, and ergonomic Rust programs based on best principles

• Effective use of declarative and procedural macros, and the difference between them

• How asynchrony works in Rust – all the way from the Pin and Waker types used in manual implementations of Futures, to how async/await saves you from thinking about most of those words

• What it means for code to be unsafe, and best practices for writing and interacting with unsafe functions and traits

• How to organize and configure more complex Rust projects so that they integrate nicely with the rest of the ecosystem

• How to write Rust code that can interoperate with non-Rust libraries and systems, or run in constrained and embedded environments

Brimming with practical, pragmatic insights that you can immediately apply, Rust for Rustaceans helps you do more with Rust, while also teaching you its underlying mechanisms.

Jon Gjengset has worked in the Rust ecosystem since the early days of Rust 1.0, and built a high-performance relational database from scratch in Rust over the course of his PhD at MIT. He’s been a frequent contributor to the Rust toolchain and ecosystem, including the asynchronous runtime tokio, and maintains several popular Rust crates, such as hdrhistogram and inferno. Jon ha...

(展开全部)

目录
Chapter 1: Rust Programming Mindset
Chapter 2: Foundations
Chapter 3: Types and Traits
Chapter 4: Designing Interfaces
Chapter 5: Error Handling

显示全部
用户评论
部分章节安排有点迷(或许和擅长点有关?要么是我的偏见习惯)比如 macros 放到 async 前,unsafe 放到 concurrency 前。关于 async,更喜欢 programming rust 里对 asynchronous 这章的诠释,把 executor 和 async 的思路玩法都大致模拟了一遍。concurrency 和 asynchronous 这两个话题都比较大,要写好都不太容易。尤其前者,所以这两章也就不苛求了吧。如果非说要有什么磕碰的(于我而言)就是风格有点全凭文字叙述,靠逻辑和潜在上下文的熟悉来推理有点太累了。建立的这架理解之梯的光谱短了些。或许这块,作者还是更擅长 YouTube live coding 的表达吧,写书感觉限制了作者。不过前面几章总结得很好。
作者不太会写书。