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 running with no overhead (like active garbage collection in Go or a virtual machine, like Java), but offers easy to read Syntax from Python and Ruby. Rust therefore performs as languages like C. This is all possible due to the compiler which safeguards any type errors and makes sure to eliminate many classical runtime errors, such as use-after-free, 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).

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