Book Image

Mastering Rust - Second Edition

By : Rahul Sharma, Vesa Kaihlavirta
Book Image

Mastering Rust - Second Edition

By: Rahul Sharma, Vesa Kaihlavirta

Overview of this book

Rust is an empowering language that provides a rare combination of safety, speed, and zero-cost abstractions. Mastering Rust – Second Edition is filled with clear and simple explanations of the language features along with real-world examples, showing you how you can build robust, scalable, and reliable programs. This second edition of the book improves upon the previous one and touches on all aspects that make Rust a great language. We have included the features from latest Rust 2018 edition such as the new module system, the smarter compiler, helpful error messages, and the stable procedural macros. You’ll learn how Rust can be used for systems programming, network programming, and even on the web. You’ll also learn techniques such as writing memory-safe code, building idiomatic Rust libraries, writing efficient asynchronous networking code, and advanced macros. The book contains a mix of theory and hands-on tasks so you acquire the skills as well as the knowledge, and it also provides exercises to hammer the concepts in. After reading this book, you will be able to implement Rust for your enterprise projects, write better tests and documentation, design for performance, and write idiomatic Rust code.
Table of Contents (19 chapters)

Building Desktop Applications with Rust

If your software only supports a terminal or command-line-based interface, your target audience is likely limited to only people who know how to use the command line. Providing a Graphical User Interface (GUI) for your software widens your target audience and gives users a friendly and intuitive interface so that they can use the software effortlessly. For building GUIs, most languages provide frameworks that consist of several native libraries that are composed together and can access the graphics and the I/O interfaces of the platform. This enables developers to easily build GUIs for their applications without worrying about the low-level details.

There are quite a few popular GUI frameworks targeting desktop platforms such as Qt, GTK+, and ImGUI, which are available for mainstream languages. At the time of writing this book, Rust doesn...