
about this book
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 JavaScript and Python.
Who should read this book
This book is focused on developers who specialize in other languages, such as C, C++, Python, and JavaScript, 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.