Programming Rust: Fast, Safe Systems Development, 3rd Edition (Early Release)
Год издания: 2025
Автор: Blandy Jim, Orendorff Jason, Tindall Leonora F.S.
Издательство: O'Reilly Media
ISBN: 978-1-0981-7622-8
Язык: Английский
Формат: EPUB
Качество: Издательский макет или текст (eBook)
Интерактивное оглавление: Да
Описание:
Rust combines low-level control with memory safety, making it an ideal choice for systems programming. Fully updated for Rust's 2024 Edition, this practical guide covers
ownership,
borrowing,
concurrency,
async programming,
generics,
macros,
C interoperability (FFI), and
unsafe code. Aimed at experienced programmers who want to write fast,
production-ready Rust code.
Язык
Rust сочетает в себе низкоуровневый контроль с безопасностью работы с памятью, что делает его идеальным выбором для системного программирования.
Это практическое руководство, полностью обновленное с учетом редакции Rust 2024 года, охватывает концепции
владения,
заимствования,
многопоточности,
асинхронного программирования,
обобщений,
макросов,
взаимодействия с языком C (FFI) и написания
небезопасного кода.
Книга предназначена для опытных программистов, желающих писать быстрый и готовый к
промышленному использованию код на Rust.
Оглавление
Brief Table of Contents (Not Yet Final)
1. A Tour of Rust
- rustup and Cargo
- Rust Functions
- Writing and Running Unit Tests
- Handling Command-Line Arguments
- Serving Pages to the Web
- Concurrency
- What the Mandelbrot Set Actually Is
- Parsing Pair Command-Line Arguments
- Mapping from Pixels to Complex Numbers
- Plotting the Set
- Writing Image Files
- A Concurrent Mandelbrot Program
- Safety Is Invisible
2. Fundamental Types
- Numeric Types
- Integer Types
- Handling Integer Overflow
- Floating-Point Types
- The bool Type
- Tuples
- Pointer Types
- Arrays, Vectors, and Slices
- Arrays
- Vectors
- Slices
- String and Character Types
- String and Character Literals
- Characters and Strings in Memory
- String
- Using Strings
- Other String-Like Types
- Type Aliases
- Beyond the Basics
3. Ownership and Moves
- Ownership
- Moves
- More Operations That Move
- Moves and Control Flow
- Moves and Indexed Content
- Copy Types: The Exception to Moves
- Rc and Arc: Shared Ownership
4. References
- References to Values
- Working with References
- Rust References Versus C++ References
- Assigning References
- References to References
- Comparing References
- References Are Never Null
- Borrowing References to Arbitrary Expressions
- References to Slices and Trait Objects
- Reference Safety
- Borrowing a Local Variable
- Receiving References as Function Arguments
- Passing References to Functions
- Returning References
- Structs Containing References
- Distinct Lifetime Parameters
- Omitting Lifetime Parameters
- Sharing Versus Mutation
- Taking Arms Against a Sea of Objects
5. Expressions
- An Expression Language
- Operator Precedence and Associativity
- Blocks
- Declarations
- if and match
- if let
- let else
- Loops
- break and continue Expressions
- 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
- Onward
About the Authors