0%

Book Description

The Rust programming language 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. With this practical guide, systems programmers will understand Rust’s rules clearly and economically. You’ll learn how to express programs that Rust can prove are free of a broad class of common errors.

Rust brings the benefits of an expressive modern type system to systems programming. Authors Jim Blandy and Jason Orendorff demonstrate how Rust’s features put programmers in control over memory consumption and processor use, combining predictable performance with memory safety and trustworthy concurrency.

You’ll learn:

  • How to write fast, safe, concurrent programs in Rust
  • Rust’s rules for managing memory efficiently, including ownership, borrowing, moves, and lifetimes
  • How to design interfaces that fit well into the Rust ecosystem
  • Rust’s all-purpose Cargo tool for building, testing, and managing Rust packages
  • High-level features like traits, generics, closures, and iterators that make Rust productive and flexible

Table of Contents

  1. Preface
    1. Who Should Read This Book
    2. Why We Wrote This Book
    3. Navigating This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
  2. 1. Why Rust?
    1. Type Safety
  3. 2. Basic Types
    1. Machine Types
      1. Integer Types
      2. Checked, Wrapping, and Saturating Arithmetic
      3. Floating-Point Types
      4. The bool Type
      5. Characters
    2. Tuples
    3. Pointer Types
      1. References
      2. Boxes
      3. Raw Pointers
    4. Arrays, Vectors, and Slices
      1. Arrays
      2. Vectors
      3. Slices
    5. String Types
      1. String Literals
      2. Byte Strings
      3. Strings in Memory
      4. String
      5. Using Strings
      6. Other String-Like Types
    6. Beyond the Basics
18.188.61.223