RantAI Academy, 2024. — 204 p. — (Non-Numerical Series Book 1). — ISBN: 978-1718503106.
Your comprehensive guide to mastering Rust. This book takes you on a journey through Rust’s core principles and advanced features, combining practical examples with thorough theoretical insights to empower you to write efficient, safe, and concurrent software. Whether you’re an aspiring systems programmer or a seasoned developer, TRPL is designed to deepen your understanding and refine your skills in modern systems programming. With over 400 thoughtfully crafted prompts, this book embraces a new era of learning, integrating the power of AI to enhance your educational experience. Explore Rust’s capabilities and unlock new possibilities with this innovative approach to programming education.
Welcome to "The Rust Programming Language" (TRPL), your gateway to mastering Rust — a modern, versatile, and high-performance programming language crafted to enhance your coding experience with greater safety and efficiency. Rust stands on the shoulders of giants like C and C++ but addresses their critical challenges, such as memory safety and concurrency, making it an ideal choice for developers who demand reliability and speed.
Rust's innovative ownership model is a game-changer, enforcing strict memory safety without the need for a garbage collector. This model eradicates common bugs like null pointer dereferencing, buffer overflows, and data races, ensuring your code is robust and reliable. Rust also boasts advanced features such as pattern matching, trait-based polymorphism, a powerful macro system, and built-in concurrency primitives, empowering you to write efficient, safe code that directly interacts with hardware components.
In Rust, the struct is a powerful tool, emphasizing composition over inheritance. Rust's structs and enums provide data encapsulation, memory safety through ownership and borrowing, implicit type conversions, user-controlled memory management, and operator overloading. These features enable you to create modular, maintainable, and performant code. The standard library prioritizes cross-platform portability, seamlessly integrating with C libraries to facilitate the incorporation of existing C codebases into your Rust projects.
Introduction to RustNotes to Reader.
A Tour of Rust: The Basics.
A Tour of Rust: Abstraction Mechanism.
A Tour of Rust: Containers and Algorithms.
A Tour of Rust: Memory Safety and Concurrency.
A Tour of Rust: Async and Parallelism Programming.
A Tour of Rust: The Toolchain.
Basic FacilitiesTypes, Declaration, and Mutability.
Ownership and Move.
Pointers and Arrays.
Structures, Unions, and Enumerations.
Statements and Expressions.
Select Operations.
Functions.
Exception Handling.
Source Files, Modules, and Programs.
Basic FacilitiesStructs.
Traits.
Encapsulation.
Composition vs Inheritance.
Generics.
Macros.
Pattern Matching.
Vector and Matrix.
Common LibrariesCrates.
Collections.
Iterators.
Algorithms.
Numerics.
Strings.
Regular Expressions.
Functional Patterns.
Memory and Performance Management.
Concurrency.
Threads and Tasks.
Parallel Programming.
Asynchronous Programming.
Network Utilities.
I/O Streams.
File Utilities.
Foreign Function Interface.
Closing.