A Friendly Introduction to Rust for C++ Developers
summary
Rust enforces ownership and borrowing so the compiler rejects dangling or simultaneous mutable/immutable references with clear error messages; examples compile on Compiler Explorer and the Rust Playground. Cargo plus crates.io provide an integrated build, test and package workflow. Examples show move-by-default semantics (use derive Copy/Clone to opt into copying), explicit lifetime annotations when returning borrowed refs, traits and generics working like C++ concepts, enums with exhaustive match checks, and Box for dynamic dispatch; runtime speed targets C++ and compile times sit near LLVM-based C++.
AI-written summary · about
chapters (26)
- 0:00Introduction
- 2:18Questions
- 3:19Disclaimer
- 4:14How to learn Rust
- 7:07Tooling
- 8:58Safety
- 10:37Error Messages
- 12:03Learning Curve
- 13:23What is Rust
- 14:44References
- 15:46Free Resources
- 17:26Paid Resources
- 18:26Syntax
- 22:26Const
- 24:36Values and References
- 26:44Examples
- 27:51Reordering code
- 30:10Valid references
- 31:57Lifetimes
- 33:28Get Bigger Value
- 36:56Example
- 41:30Compile Times
- 44:05Copy Move Semantics
- 48:41Expressions
- 51:55Immutable
- 57:03methods
related talks
59mRust for C++ developers - What you need to know to get rolling with crates
01h 22mRust for the C++ Programmer
43mRust intro for Java Developers
12mWhy you should be checking out Rust
35mLet’s Talk About Rust
58mRust for The Curious C++ Developers
01h 14mRust: A Friendly Introduction
36mRust as a High-Level Langage
