This chapter gives a short introduction to why Rust is a solid tool for building all kinds of application, and a brief overview of the format and organization of the book.
● Introduction
● Why Rust?
● Who should read this book?
● Chapters overview
Chapter 2, Building a command-line program
This chapter will teach you how to build a command-line program with Rust.
● What are we going to build? (We'll build a cowsay-like tool)
● Building a binary program in Rust
● Handling positional arguments
● Handling optional arguments
● Building a text-based user interface with ncurses
● Summary
Chapter 3, Creating graphical user interfaces (GUIs)
This chapter will teach you how to build a cross-platform GUI program in Rust.
● What are we going to build? (A desktop cat breed photo viewer)
● Introduction to GTK+
● Components of a GUI program
● Creating a window
● Handling user input
● Supporting multiple operating system
● Summary
Chapter 4, Building a game
This chapter will teach you how to build an 2D game with Rust
● What are we going to build? (A 2D cat volleyball game)
● Game frameworks in Rust
● Building a 2D game in Rust
● Rendering the map
● Controlling the character with keyboard
● Enemies incoming!
● Adding sound effects
● Summary
Chapter 5, Going mobile
This chapter will demonstrate how to build an Android app using Rust
● How to make Rust run on Android
● What are we going to build? (A pokedex-like cat breed catalog)
● Building the app skeleton
● Showing pictures
● Adding search
Chapter 6, Programming embedded devices
This chapter will demonstrate how to program an embedded device in Rust using a hardware development board. We'll also be using a QEUM emulator so readers can follow along without the hardware.
● What are we going to build? (Either a STM32 development board or Arduino, still need more research)
● How cross-compilation works?
● Introducing the development board and QEUM
● Setting up the toolchain for embedded programming
● Communication using serial port
● Programming the hardware timer
● Debugging on an embedded device
● Summary
Chapter 7, Artificial intelligence and machine learning
This chapter will introduce machine learning libraries in Rust and show a simple image recognition demo
● How does machine learning work
● What are we going to build? (A cat image detector)
● Mathematical background
● Preparing the dataset
● Training the model
● Making predictions
Chapter 8, Advanced topics
This chapter will discuss other more advanced use of Rust. Each section will introduce one application, existing projects for that kind of application and their status. But we'll not go into the detail as the previous chapters.
● Working with other languages
● Operating system - Redox
● The vast universe of Rust applications
Shing Lyu is a software engineer who is passionate about open source software. He's worked on Rust professionally at Mozilla, on the Firefox (Gecko) and Servo browser engine project. Currently, he is working at DAZN, a sports streaming platform as a backend developer, with a focus on AWS and serverless technology. Shing has worked for many world famous brands such as Mozilla and Intel. He is also active in the open source community. Being one of the founders of the Taiwan Rust community, he loves to share his enthusiasm for Rust with people.
Go beyond the basics and build complete applications using the Rust programming language. The applications in this book include a high-performance web client, a microcontroller (for a robot, for example), a game, an app that runs on Android, and an application that incorporates AI and machine learning.
Each chapter will be organized in the following format: what this kind of application looks like; requirements and user stories of our example program; an introduction to the Rust libraries used; the actual implementation of the example program, including common pitfalls and their solutions; and a brief comparison of libraries for building each application, if there is no clear winner.
Practical Rust Projects will open your eyes to the world of practical applications of Rust. After reading the book, you will be able to apply your Rust knowledge to build your own projects.
You will:
Write Rust code that runs on microcontrollers
Build a 2D game
Create Rust-based mobile Android applications
Use Rust to build AI and machine learning applications