Book Image

Creative Projects for Rust Programmers

By : Carlo Milanesi
Book Image

Creative Projects for Rust Programmers

By: Carlo Milanesi

Overview of this book

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.
Table of Contents (14 chapters)

Chapter 7

  1. A vector is an entity that can be added to another vector and can be multiplied by a number. It is senseless to add two points or to multiply a point by a number.
  2. In geometry, a vector is a translation or displacement; a point is a position.
  3. Because some events are discrete. For example, when I click on a button, I am not interested in how many milliseconds the mouse is pressed; I just want to get one click event. If I type a word, I want to get just one character input for every key pressed.
  4. Because assets are usually loaded only at application startup, or when a level is entered or exited.
  5. The optional key_down_event, key_up_event, mouse_button_down_event, and mouse_button_up_event methods can be defined for the EventHandler trait. Such methods register in the model that they have been called (that is, that the corresponding events have happened in the time frame). Then, the update method checks and resets such settings in the model.
  6. It is a set of shapes to draw. To draw...