“Rust is on its seventh year as the most loved language with 87% of developers saying they want to continue using it.”
Slide 23
To name a few… Web development: Actix, Rocket, Tide Async programming: Tokio, async-std
Growing ecosystem of libraries and tools
Serialization: Serde Blockchain: Substrate, ink! Database ORMs: Diesel, sqlx, Cryptography and security: scale, ring, rustls GUI development: druid, iced Game development: Amethyst, Bevy, ggez
Slide 24
Regular release cycle
Actively being improved and developed
Community-driven RFC process - Focus on ergonomics, performance and stability - Strong emphasis on backward compatibility
Slide 25
Cargo: Package Manager and build tool crates.io: Package registry
Slide 26
Slide 27
That’s different than Rubygems 🤔
Slide 28
Syntax
Slide 29
A Quick Look
Slide 30
Slide 31
Slide 32
Slide 33
Type System
Slide 34
Slide 35
Slide 36
Slide 37
Memory and Ownership
Slide 38
Memory Management
Slide 39
Slide 40
Slide 41
JavaScript relies on garbage collection to free memory from previous large arrays, which may introduce performance overhead. Rust deallocates memory as soon as it’s no longer needed, providing efficient and deterministic memory management.
Slide 42
Ownership
Slide 43
Slide 44
Slide 45
Slide 46
Once Pac-man (i.e. Rust) consumes (i.e. owns) the ball, it’s no longer available
Slide 47
Generics
Slide 48
What are generics?
Slide 49
Generics allow writing flexible, reusable, and type-safe code without specifying concrete data types
Slide 50
Create functions, structs, enums, and traits that work with multiple data types
Slide 51
Why use generics?
Slide 52
Generics provide a way to achieve flexibility similar to dynamically typed languages while maintaining type safety benefits of static typing
Slide 53
Generics Syntax
Slide 54
Slide 55
It’s Reusable!
Slide 56
Slide 57
Slide 58
Slide 59
Continue Your Learning
Slide 60
Maybe you heard about the Rust book before…
Slide 61
Slide 62
Have you heard about the Brown University version?