HeadlinesBriefing favicon HeadlinesBriefing.com

How to Build The Rust Book Locally on Linux

DEV Community •
×

For developers who prefer documentation over video tutorials, The Rust Programming Language offers a premier learning resource. This open-source book is maintained by the community and available in multiple languages, including Portuguese. Building it locally provides offline access, faster navigation, and direct access to source files for potential contributions.

The process begins with installing Rust via rustup, the official toolchain manager. This sets up both the language and its package manager, Cargo. Next, you'll install mdBook, the tool used to build and serve the book from its Markdown source. Cloning the repository from GitHub follows, with options for the original English or community translations.

Running `mdbook build` generates a static site you can open in any browser. For a live-reloading experience, `mdbook serve` starts a local server. This hands-on approach not only gives you the documentation offline but also familiarizes you with Rust's tooling and open-source workflow from day one.