Beginning Rust: Get Started with Rust 2021 Edition

  • 5h 50m
  • Carlo Milanesi
  • Apress
  • 2021

Learn to program with Rust 2021 Edition, in an easy, step-by-step manner on Unix, the Linux shell, macOS, and the Windows command line. As you read this book, you’ll build on the knowledge you gained in previous chapters and see what Rust has to offer.

Beginning Rust starts with the basics of Rust, including how to name objects, control execution flow, and handle primitive types. You’ll see how to do arithmetic, allocate memory, use iterators, and handle input/output. Once you have mastered these core skills, you’ll work on handling errors and using the object-oriented features of Rust to build robust Rust applications in no time.

Only a basic knowledge of programming is required, preferably in C or C++. To understand this book, it's enough to know what integers and floating-point numbers are, and to distinguish identifiers from string literals. After reading this book, you'll be ready to build Rust applications.

You will:

  • Get started programming with Rust
  • Understand heterogeneous data structures and data sequences
  • Define functions, generic functions, structs, and more
  • Work with closures, changeable strings, ranges and slices
  • Use traits and learn about lifetimes

About the Author

Carlo Milanesi is a professional software developer and expert who uses Rust. He has contributed to the Rust development community, and also has done web application development in Linux with PHP, JavaScript, Java, and the Ionic and Vaadin frameworks. Lastly, he has been in involved in these other technologies: GUI design, 2D and 3D rendering, testing automation, and database access. Carlo's applications include CAM/CAM for the stone machining industry, lens cutting laboratory automation, and corporate-wide web applications.

In this Book

  • Getting Started
  • Doing Arithmetic and Writing More Code
  • Naming Objects
  • Controlling Execution Flow
  • Using Data Sequences
  • Using Primitive Types
  • Enumerations and Matching
  • Using Heterogeneous Data Structures
  • Defining Functions
  • Defining Generic Functions and Types
  • Allocating Memory
  • Data Implementation
  • Defining Closures
  • Using Changeable Strings
  • Ranges and Slices
  • Using Iterators
  • Input/Output and Error Handling
  • Data Encapsulation
  • Using Traits
  • Object-Oriented Programming
  • Standard Library Collections
  • Ownership, Moves, and Copies
  • Borrowing and Lifetimes
  • More About Lifetimes