Rust in Action
Tim McNamara
  • MEAP began July 2017
  • Publication in Early 2019 (estimated)
  • ISBN 9781617294556
  • 400 pages (estimated)
  • printed in black & white

Rust in Action introduces the Rust programming language by exploring numerous systems programming concepts and techniques.You'll be learning Rust by delving into how computers work under the hood. You'll find yourself playing with persistent storage, memory, networking and even tinkering with CPU instructions. The book takes you through using Rust to extend other applications and teaches you tricks to write blindingly fast code. You'll also discover parallel and concurrent programming. Filled to the brim with real-life use-cases and scenarios, you'll go beyond the Rust syntax and see what Rust has to offer in real-world use cases.

Table of Contents detailed table of contents

Part 1: Just Enough Rust

1. Introducing Rust

1.1. What is Rust?

1.1.1. Safety

1.1.2. Ergonomics

1.1.3. Control

1.2. Rust’s Big Features

1.2.1. Performance

1.2.2. Concurrency

1.2.3. Memory Efficiency

1.3. Downsides of Rust

1.3.1. Compile Times

1.3.2. Strictness

1.3.3. Size of the Language

1.3.4. Hype

1.3.5. Single Implementation

1.4. Where Rust Fits

1.4.1. Data Processing

1.4.2. Extending an Application

1.4.3. Operating in Resource-constrained Environments

1.4.4. Applications

1.4.5. Systems Programming

1.5. Rust’s hidden feature: its community

1.6. A Taste of the Language

1.6.1. Cheating Your Way To "Hello, world!"

1.6.2. Your First Rust Program

1.7. Summary

2. Language Foundations

2.1. A Glance at Rust’s Syntax

2.1.1. A whole program with main()

2.2. Starting out With Numbers

2.3. Type-aware control flow with match

2.4. Getting Stuff Done With Functions

2.5. Advanced Function Definitions

2.5.1. Explicit Lifetime Annotations

2.5.2. Generic Functions

2.6. Creating grep-lite v1

2.7. Making Lists of Things with Arrays, Slices and Vectors

2.7.1. Arrays

2.7.2. Slices

2.7.3. Vectors

2.8. Including Third Party Code

2.8.1. Adding Support for Regular Expressions

2.8.2. Generating Crates' Documentation Locally

2.8.3. Managing Rust toolchains with rustup

2.9. Supporting Command Line Arguments

2.10. Reading From Files

2.11. Reading from STDIN

2.12. Summary

3. Compound Data Types

4. Lifetimes, Ownership and Borrowing

Part 2: Programming from the Ground Up (Almost)

5. Data

6. Memory

7. Storage

8. Network

9. Time

10. Interruptions

Part 3: Concurrent and Parallel Programming

11. Creating a Distributed Graph

12. Sharing Resources with Locks

13. Sharing Resources with Atomic Operations

Part 4: Extending Applications Up and Out

14. C Extensions in Rust

15. Beyond the Server

About the Technology

Rust is a new systems programming language that gives you the low-level power of C with the elegance and ease of languages like Ruby and Python. Rust is thread safe, enabling "fearless concurrency". Threads are guaranteed not to overwrite each others' data, but it doesn't impose a garbage collector on you, keeping runtime performance predictable. It incorporates features from functional programming such as higher-order functions that allow for compact, readable programs. Rust is perfect for developers who want to fearlessly explore systems programming with a more ergonomic, less intimidating alternative to C or C++.

What's inside

  • Portability with Rust
  • Concurrent and parallel programming
  • Sharing resources with locks or atomic operations
  • Avoiding programming with global state
  • Message passing inside your applications
  • Memory management and garbage collection

About the reader

Readers need intermediate programming skills and familiarity with general computer science concepts, the command line, and networking.

About the author

Tim McNamara is an experienced programmer with a deep interest in natural language processing, text mining, and wider forms of machine learning and artificial intelligence. He is very active in open source communities including the New Zealand Open Source Society.


Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
MEAP combo $44.99 pBook + eBook + liveBook
MEAP eBook $35.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks