Название: Refactoring to Rust (Final Release) Автор: Lily Mara, Joel Holmes Издательство: Manning Publications Год: 2025 Страниц: 304 Язык: английский Формат: pdf (true) Размер: 25.7 MB
Get the speed and reliability of Rust libraries, functions, and high-performance features through incremental adoption without rewriting your codebase from scratch.
In Refactoring to Rust you will learn to:
• Create Rust libraries you can call from other programming languages • Integrate Rust functions with code in other languages • Use Rust’s ownership and borrowing system to write high performance code • Handle errors as values using Rust’s enums • Minimize unnecessary memory usage with Rust’s multiple string types • Boost performance with Rust concurrency and async event processing • Create Rust HTTP services
Refactoring to Rust teaches you how to take advantage of Rust’s easy-to-use interoperating mechanisms. Learn practical code-mixing techniques like embedding Rust libraries into apps written in other languages. This practical guide emphasises techniques for incrementally refactoring performance-critical code to Rust while keeping the rest of your application in its original language.
About the technology:
Incremental refactoring to Rust lets you upgrade your key functionalities without needing to start from scratch. These small changes are a great way to introduce Rust, and immediately ramp up your program’s speed and stability.
Martin Fowler’s renowned book Refactoring emphasizes the primary goal of refactoring: to enhance the design of existing code. Readers familiar with the book will recognize its method of presenting various code segments, followed by improved alternatives that enhance readability, efficiency, or simplicity. While the strategies have evolved in the second edition, the core message remains unchanged: functional code can always be improved.
Refactoring to Rust outlines strategies for transitioning from one programming language to another while preserving the external behavior of the code. How is this achieved? As we will examine, Rust is designed to gradually replace other languages by integrating and decomposing existing code—much like the process of rusting iron—and substituting it with Rust code. Initially focused on replacing C++, the project has expanded to include jаvascript and Python.
About the book:
Refactoring to Rust teaches you to combine your favorite programming language with high-performance Rust code. Author Lily Mara introduces Rust in her easy-to-read style, clearly explaining the language's unique syntax and concepts. You’ll augment programs with Rust hands-on with approachable examples like solving FizzBuzz with Rust’s pattern matching and gaining enormous runtime speedups to Python code. When you’re done, you’ll have mastered techniques for building Rust plugins you can apply to all kinds of existing software, from games to data tools.
About the reader: For intermediate programmers. No Rust experience required.
This book is focused on developers who specialize in other languages, such as C, C++, Python, and jаvascript, but want to learn Rust. While this book does not give you an in-depth view of the language, it does provide practical examples and use cases to change your code to Rust. No formal understanding of Rust is needed, although it is helpful.
Скачать Refactoring to Rust (Final Release)
|