Originally designed by Mozilla Research for writing the next generation of web browsers, the Rust programming language offers the same degree of control over memory and performance as C and C++, all while ensuring memory safety (at compile time) without resorting to a garbage collector or a managed runtime. Rust programs are free of bugs such as dangling pointers, NULL pointer dereferences, buffer overruns, use-after-frees, double-frees, and iterator invalidation.
These safety guarantees make Rust well-suited for security-sensitive applications, but they also make multithreaded programming much less fraught with peril: Rust ensures (again, at compile time) that threads can never accidentally alias shared mutable state, even as they share data structures among themselves or as they take references to data in other stack frames.
The price, you ask? By moving so many classes of bugs from runtime to compile time, Rust forces you to think hard up front about the use of pointers within your program. Understanding Rust’s concept of ownership can be daunting for newcomers. Ben Striegel leads an active, hands-on introduction to Rust, explaining Rust’s novel characteristics and demonstrating how you can put them to work in your own projects.
Ben Striegel is one of the earliest members of the Rust community, having stumbled across the language in 2011, and has been an active contributor to the project ever since. Today, Ben is a member of Rust’s official community outreach team and focuses on teaching and mentoring newcomers and interfacing with other open source communities.
©2016, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • email@example.com