Автор: Donis Marshall
Издательство: Addison-Wesley/Pearson
Год: 2024
Страниц: 401
Язык: английский
Формат: pdf (true), epub (true)
Размер: 23.9 MB
Make Rust a key tool in your arsenal, and access one of the industry's fastest-growing areas of opportunity.
Rust's exciting innovations have made it the most loved programming language in Stack Overflow's influential survey for five straight years--but its steep learning curve has made many other developers reluctant to dive in. Now, with a growing commitment to Rust from many of the world's leading development organizations, it's the perfect time to start--especially now that there's an up-to-date, accessible, example-rich book to guide you.
In Programming with Rust, long-time enterprise developer Donis Marshall has made Rust easier to understand than ever, with a guide expertly organized into short, bite-sized chapters that bring you up-to-speed fast. Written for developers at all levels, Marshall starts with the absolute basics, and thoroughly demystifies the Rust technical advances that make it so attractive for next-generation development. Everything's here, from types and assignments to ownership, lifetimes, traits, and crates. Marshall even offers indispensable expert advice for unit testing, handling unsafe code, interoperating with legacy code bases, and using Rust's increasingly robust tools.
Rust is a general-purpose language for creating safe, secure, and scalable applications. The language has features from several programming paradigms, as described shortly. Rust was originally designed as a systems programming language. However, it has emerged as a more versatile language capable of creating a variety of application types, including systems programming, web services, desktop applications, embedded systems, and more. Although it may sound cliché, what you can accomplish with Rust is only limited by your imagination.
Different! That is an accurate assessment of Rust. Although the Rust syntax is based on the C and C++ languages, the similarity with other C-based languages often ends there. In addition, Rust is not different just to be different; it is a difference with a purpose.
Rust’s borrow checker is an excellent example of a difference with a purpose. The borrow checker is a unique feature within Rust that promotes safe coding practices by enforcing rules related to the single ownership principal. No other language has this feature. For that reason, the borrow checker is a foreign concept to many developers but nonetheless invaluable.
In many ways, Rust represents lessons learned. Some of the unique features in Rust are lessons learned, or instances of a lack of success, from other languages. The willingness of Rust to depart from the normal script when necessary is a major feature of the language. Many programming languages struggle with effective memory management, for example. That is the purpose of the ownership feature in Rust—effective memory management.
Let’s be candid for a moment. Learning Rust can be frustrating at times. It requires an investment of time and the sacrifice of some brain cells. However, you will find that your investment in learning Rust is more than worthwhile. For example, learning to work with the borrow checker, not against it, is invaluable.
My goal in writing this book is to increase the number of Rustaceans—individuals with a high proficiency in the Rust programming language. My hope is that you will become an active member of the Rust community with your new mastery of the language. You have now officially started the journey toward becoming a Rustacean.
• Contains short, easy-to-consume chapters
• Clearly illustrates innovative features such as lifetimes, ownerships, and patterns
• Practical, focused, complete, and up-to-date
• Written for newcomers and professional developers alike
More than just a new language, Rust represents a philosophical shift in how you code. In Programming with Rust, you'll master both the techniques and the mindset.
Скачать Programming with Rust (Final)