Rust is presented as a systems language that blends the speed of low-level code with modern developer ergonomics. The chapter argues that its main advantage is the compiler, which catches type and memory-safety problems before a program runs, preventing many classic runtime bugs. It also emphasizes Rust’s growing popularity and practical value, especially for developers who want to expand into backend work, WebAssembly, blockchain, or other performance-sensitive domains.
The chapter then introduces Rust’s built-in tooling as a major part of its appeal. Rustup is used to install and update Rust and its components, Cargo manages projects and dependencies, rustfmt keeps code consistently formatted, and Clippy provides linting support. A newly created project demonstrates how Cargo organizes files, builds code, and runs programs, while Cargo.toml and Cargo.lock help define project metadata and keep dependency versions reproducible across machines.
Finally, the text explains why Rust is a strong choice for web services even though it does not include a full HTTP stack in the standard library. Rust covers TCP and leaves HTTP and higher-level frameworks to the ecosystem, which gives developers flexibility through tools such as Hyper, Warp, Actix Web, and Tokio. The chapter also highlights asynchronous programming, showing how Rust uses async, await, futures, and runtimes to handle many requests efficiently, and it closes by stressing maintainability through documentation, modular design, testing, and the supportive community around Rust.
All the tools you need to write and deliver Rust applications with
After installing Rustup, you have the Rust standard library on your machine, which includes the Rust compiler.
Comparing Rust and other languages in compiling machine code from source code
Rust covers TCP, but leaves HTTP and larger web framework implementations to the community.
Rust provides the syntax and the type for asynchronous programming, but the runtime and kernel abstractions are implemented outside the core language.
Summary
Rust is a systems programming language that produces binaries.
It comes with a strict compiler with helpful error messages, so you have an easy time spotting mistakes and improvements.
The tooling around Rust ships with the Rust installation itself or has official recommendations so you save time by not constantly exploring, discussing, and learning new tools.
You have to pick a runtime when writing asynchronous code (the “how” will be covered in chapter 2), since Rust doesn’t include one like Go or Node.js does.
Web frameworks are built on top of runtimes, so your choice is made by the framework you choose later.
Rust’s speed, safety, and correctness will help you a huge amount when maintaining small to large web services and codebases.
Documentation and testing are built into the language itself, which makes maintaining your code even easier.
FAQ
What makes Rust different from interpreted languages like JavaScript or Ruby?Rust is a compiled systems programming language, not an interpreted one. It produces machine code through a compiler, which gives it high performance while also enforcing safety checks before the program runs.Why is Rust considered fast?Rust has no runtime and no garbage collection, so it avoids the overhead common in many other languages. Its compiled binaries are designed to run with C-like performance.How does Rust improve memory safety?Rust’s compiler checks types and ownership rules at compile time and helps prevent many runtime bugs, including memory errors like use-after-free, before the code is executed.What tools come with a standard Rust installation?Rust comes with Rustup for managing installations and components, Cargo for building and managing projects, rustfmt for formatting code, and Clippy for linting and code quality checks.What is Cargo used for in Rust?Cargo is Rust’s package manager and build tool. It can create new projects, build and run applications, manage dependencies, and help generate documentation and run tests.What is the purpose of Cargo.toml?Cargo.toml is the project manifest file. It stores metadata about the project and lists dependencies that Cargo should download and build.Does Rust include HTTP support in its standard library?No. Rust’s standard library includes TCP support, but HTTP is left to the community. To build web servers, developers typically use third-party crates or web frameworks such as Warp, Axum, or Actix Web.Why is asynchronous programming important for web services in Rust?Asynchronous programming helps a server handle many requests efficiently without blocking on long tasks like database access or file operations. Rust supports async syntax and futures, while runtimes like Tokio manage execution in the background.What makes Rust applications easier to maintain?Rust includes built-in support for documentation, testing, modular code organization, formatting, and linting. These tools help teams keep code consistent and reduce maintenance friction.Who is this chapter and book intended for?This chapter assumes you already know some Rust basics and understand general web service concepts. It is meant to help you refresh Rust skills and learn how to build reliable web services, even if you found Rust difficult at first.
pro $24.99 per month
access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!