Skip to content

lily-mara/refactoring-to-rust

Repository files navigation

Code from for Refactoring to Rust

Get the book Here!

This repository contains all of the code listings from the new book, Refactoring to Rust. Listings are organized by chapter number and listing number in the text. Larger examples, which may not be expressible in a single listing, are given their own directories.

Running the code

Most of the examples are written in Rust or Python 3. The latest Rust compiler can be installed by following the instructions at https://rustup.rs/

The simpler Rust examples can be tried in a web browser without installing any software, by visiting https://play.rust-lang.org/

IMPORTANT: Some sections of the book illustrate compiler errors that developers new to Rust can commonly make. Listings which have NO_COMPILE in the directory names are expected to fail to compile.