chapter one

1 Why Rust?

 

This chapter covers

  • The tooling which comes bundled with a standard Rust installation
  • A first glimpse of the Rust compiler and what makes it so unique
  • What is needed to write web services in Rust
  • Features which support the maintainability of Rust applications

Rust is a systems programming language, and instead of an interpreted language like JavaScript or Ruby, it has a compiler like Go, C or Swift. It combines no active runtime (from C) but offers language ergonomics known from Python and Ruby (see Figure 1.3 for refence). This is all possible due to the compiler which safeguards any type errors and makes sure you don’t have any memory issues before you run your application.

Rust offers performance (it has no runtime nor garbage collection), safety (the compiler makes sure everything is memory-safe, even in asynchronous environments) and productivity (its built-in tooling around testing, documentation and the package manager makes it a breeze to build and maintain).

You might have heard about Rust, but after trying to go through the tutorials, have given up on it. Rust comes up as the most-loved programming language on the yearly StackOverflow surveys, and found a large following in corporations like Facebook, Google, Apple and Microsoft. This book will show you how to become comfortable with the basics of Rust and how to build and ship solid web services with it.

1.1 Batteries included: Rust’s tooling

1.2 The Rust compiler

1.3 Rust for web services

1.4 Maintainability of Rust applications

1.5 Summary