Rust for Rustaceans: Idiomatic Programming for Experienced Developers (Paperback)

Gjengset, Jon

  • 出版商: No Starch Press
  • 出版日期: 2021-12-21
  • 售價: $1,550
  • 貴賓價: 9.5$1,473
  • 語言: 英文
  • 頁數: 280
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1718501854
  • ISBN-13: 9781718501850
  • 相關分類: Rust 語言
  • 立即出貨 (庫存 < 4)

買這商品的人也買了...

相關主題

商品描述

Master professional-level coding in Rust.

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.

商品描述(中文翻譯)

精通 Rust 專業級編碼。

對於已經掌握基礎知識的開發者來說,這本書是你在 Rust 專業級編程道路上的下一步。它涵蓋了構建和維護更大的代碼庫、編寫強大靈活的應用程序和庫、以及自信地擴展項目範圍和複雜性所需的一切。

作者 Jon Gjengset 深入探討了 Rust 編程語言,剖析了核心主題,如所有權、特性、並發和不安全代碼。你將探索類型佈局和特性一致性等關鍵概念,深入研究並發編程和異步性與 async/await 的內部運作,並遊覽 no_std 編程的世界。Gjengset 還提供了關於 API 設計、測試策略和錯誤處理的專家指導,並將幫助你理解外部函數接口、對象安全性、程序宏等等。

你將學到:
- 如何基於最佳原則設計可靠、符合慣例且人性化的 Rust 程序
- 如何有效使用聲明式和程序式宏,以及它們之間的區別
- Rust 中異步性的運作方式 - 從手動實現 Futures 中使用的 Pin 和 Waker 類型,到 async/await 如何幫助你省去大部分思考
- 代碼不安全的含義,以及編寫和與不安全函數和特性交互的最佳實踐
- 如何組織和配置更複雜的 Rust 項目,使其與生態系統的其他部分良好集成
- 如何編寫可以與非 Rust 函數庫和系統互操作,或在受限和嵌入式環境中運行的 Rust 代碼

《Rust for Rustaceans》充滿了實用、務實的見解,你可以立即應用,它不僅幫助你更好地使用 Rust,還教你其底層機制。

作者簡介

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 has been teaching Rust since 2018, when he started live-streaming intermediate-level Rust programming. Since then, he's made videos that cover advanced topics like async and await, pinning, variance, atomics, dynamic dispatch, and more, which have been received enthusiastically by the Rust community.

David Tolnay, who reviewed the book's technical content, is a prolific, well-known, and respected contributor in the Rust ecosystem who maintains some of the most widely used Rust libraries, including syn, serde, and anyhow. He is also a member of the Rust library team.

作者簡介(中文翻譯)

Jon Gjengset自Rust 1.0的早期開始就在Rust生態系統中工作,並在麻省理工學院攻讀博士期間從頭開始用Rust建立了一個高性能的關聯式數據庫。他是Rust工具鏈和生態系統的頻繁貢獻者,包括異步運行時tokio,並維護著幾個受歡迎的Rust庫,如hdrhistogram和inferno。Jon自2018年開始教授Rust,當時他開始直播中級Rust編程。從那時起,他製作了涵蓋高級主題(如異步和等待、固定、變異、原子操作、動態分派等)的視頻,這些視頻受到了Rust社區的熱烈歡迎。

David Tolnay是該書技術內容的審查者,他是Rust生態系統中一位多產、知名且受人尊敬的貢獻者,維護著一些最廣泛使用的Rust庫,包括syn、serde和anyhow。他還是Rust庫團隊的成員。