▶Book Description
Rust is a community-built language that solves pain points present in many other languages, thus improving performance and safety. In this book, you will explore the latest features of Rust by building robust applications across different domains and platforms.
The book gets you up and running with high-quality open source libraries and frameworks available in the Rust ecosystem that can help you to develop efficient applications with Rust. You'll learn how to build projects in domains such as data access, RESTful web services, web applications, 2D games for web and desktop, interpreters and compilers, emulators, and Linux Kernel modules. For each of these application types, you'll use frameworks such as Actix, Tera, Yew, Quicksilver, ggez, and nom. This book will not only help you to build on your knowledge of Rust but also help you to choose an appropriate framework for building your project.
By the end of this Rust book, you will have learned how to build fast and safe applications with Rust and have the real-world experience you need to advance in your career.
▶What You Will Learn
- Access TOML, JSON, and XML files and SQLite, PostgreSQL, and Redis databases
- Develop a RESTful web service using JSON payloads
- Create a web application using HTML templates and JavaScript and a frontend web application or web game using WebAssembly
- Build desktop 2D games
- Develop an interpreter and a compiler for a programming language
- Create a machine language emulator
- Extend the Linux Kernel with loadable modules
▶Key Features
- Work through projects that will help you build high-performance applications with Rust
- Delve into concepts such as error handling, memory management, concurrency, generics, and macros with Rust
- Improve business productivity by choosing the right libraries and frameworks for your applications
▶Who This Book Is For
This Rust programming book is for developers who want to get hands-on experience with implementing their knowledge of Rust programming, and are looking for expert advice on which libraries and frameworks they can adopt to develop software that typically uses the Rust language.
▶What this book covers
- Chapter 1, Rust 2018 – Productivity, describes recent innovations in the Rust language and its ecosystem of tools and libraries. In particular, it shows you how to use some utility libraries that are in widespread usage.
- Chapter 2, Storing and Retrieving Data, describes how to read and write some of the most popular text file formats in the Rust world: TOML, JSON, and XML. It also describes how to access some of the most popular database engines in the Rust world, such as SQLite, PostgreSQL, and Redis.
- Chapter 3, Creating a REST Web Service, describes how to use the Actix framework to develop a REST service that can be used as a backend for any kind of client application, particularly web applications.
- Chapter 4, Creating a Full Server-Side Web App, describes how to use the Tera template engine to replace placeholders in a text file, and how to use the Actix framework to create a full server-side web application.
- Chapter 5, Creating a Client-Side WebAssembly App Using Yew, describes how to use the Yew framework, which exploits the WebAssembly technology, to create the frontend of a web application.
- Chapter 6, Creating a WebAssembly Game Using Quicksilver, describes how to use the Quicksilver framework to create graphical 2D games that can be run in a web browser, exploiting the WebAssembly technology, or as a desktop application.
- Chapter 7, Creating a Desktop Two-Dimensional Game Using ggez, describes how to use the ggez framework to create graphical 2D games for desktop, including the coverage of widgets.
- Chapter 8, Using a Parser Combinator for Interpreting and Compiling, describes how to use the Nom parser combinator to create parsers of formal languages and then build syntax checkers, interpreters, and compilers.
- Chapter 9, Creating a Computer Emulator Using Nom, describes how to use the Nom library to parse binary data and interpret a machine language program, which is the first step in building a computer emulator.
- Chapter 10, Creating a Linux Kernel Module, describes how to build Linux loadable modules using Rust, focusing on the Mint distribution; specifically, a character device driver will be built.
- Chapter 11, The Future of Rust, describes the innovations that are probably going to appear in the next few years in the Rust ecosystem. In particular, the new asynchronous programming technique is briefly shown.