SlideShare a Scribd company logo
API Days Paris
Zacaria Chtatar - December 2023
https://havesome-rust-apidays.surge.sh
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and Cheap APIs, Zacaria Chtatar, HaveSomeCode
Forget TypeScript
Forget TypeScript
Choose Rust
Forget TypeScript
Choose Rust
to build
Forget TypeScript
Choose Rust
to build
Robust, Fast and Cheap APIs
Some context
2009
JS lives in the browser
Until Nodejs
V8 engine, modules system & NPM
modules
boom of easy to reuse code
fullstack JS : Easy to start with, hard to master
Fullstack
paradigm clash between static and dynamic
JS doesn't help you follow strict API interfaces
Fullstack
paradigm clash between static and dynamic
JS doesn't help you follow strict API interfaces
TypeScript
Benefits:
IDE Developer experience
OOP patterns
compiler checks
type system
=> better management of big codebase
Pain points
does not save you from dealing with JS
adds types management
adds static layer onto dynamic layer
Pain points
does not save you from dealing with JS
adds types management
adds static layer onto dynamic layer
JSDoc answers to the precise problem of hinting types without getting in
your way
New stakes, new needs
Stakes Needs
worldwide scale
privacy
market competition
environment
human lives
scalability
security
functionality
computation time
memory footprint
safety
Stakes Needs
worldwide scale
privacy
market competition
environment
human lives
scalability
security
functionality
computation time
memory footprint
safety
TypeScript is not enough
Introducing Rust
Fast, Reliable, Productive: pick three
Stable
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and Cheap APIs, Zacaria Chtatar, HaveSomeCode
enums
struct FakeCat {
alive: bool,
hungry: bool,
}
let zombie = FakeCat { alive: false, hungry: true }; // ???
enums
struct FakeCat {
alive: bool,
hungry: bool,
}
let zombie = FakeCat { alive: false, hungry: true }; // ???
Rust makes it easy to make invalid state
unrepresentable
enums
struct FakeCat {
alive: bool,
hungry: bool,
}
let zombie = FakeCat { alive: false, hungry: true }; // ???
Rust makes it easy to make invalid state
unrepresentable
enum RealCat {
Alive { hungry: bool }, // enums can contain structs
Dead,
}
let cat = RealCat::Alive { hungry: true };
let dead_cat = RealCat::Dead;
Option enum
// full code of the solution to the billion dollar mistake
// included in the standard library
enum Option<T> {
None,
Some(T),
}
let item: Option<Item> = get_item();
match item {
Some(item) => map_item(item),
None => handle_none_case(), // does not compile if omitted
}
What is wrong with this function ?
function getConfig(path: string): string {
return fs.readFileSync(path);
}
What is wrong with this function ?
function getConfig(path: string): string {
return fs.readFileSync(path);
}
There is no hint that readFileSync can throw an error under some conditions
Result enum
enum Result<T, E> {
Ok(T),
Err(E),
}
fn get_config(path: &str) -> Result<String, io::Error> {
fs::read_to_string(path)
}
// That's a shortcut, don't send me to prod !
fn dirty_get_config(path: &str) -> String {
fs::read_to_string(path).unwrap() // panics in case of error
}
Result enum
enum Result<T, E> {
Ok(T),
Err(E),
}
fn get_config(path: &str) -> Result<String, io::Error> {
fs::read_to_string(path)
}
// That's a shortcut, don't send me to prod !
fn dirty_get_config(path: &str) -> String {
fs::read_to_string(path).unwrap() // panics in case of error
}
We need to clarify what can go wrong
Result enum
enum Result<T, E> {
Ok(T),
Err(E),
}
fn get_config(path: &str) -> Result<String, io::Error> {
fs::read_to_string(path)
}
// That's a shortcut, don't send me to prod !
fn dirty_get_config(path: &str) -> String {
fs::read_to_string(path).unwrap() // panics in case of error
}
We need to clarify what can go wrong
It's even better when it's embedded in the language
2016 : Do you remember the ?
le -pad incident
Source
crates.io
no crate (package) unpublish
can disable crate only for new projects
Linux: The Kernel
Linux: The Kernel
attract young devs
Linux: The Kernel
attract young devs
2/3 of vunerabilities come from memory management
Linux: The Kernel
attract young devs
2/3 of vunerabilities come from memory management
Kernel is in C and Assembly
Linux: The Kernel
attract young devs
2/3 of vunerabilities come from memory management
Kernel is in C and Assembly
Linus Torvalds : C++
Fast
2017 : Energy efficiency accross programing languages
Github:
45 million repos
28 TB of unique content
Code Search index
Github:
45 million repos
28 TB of unique content
Code Search index
several months with Elasticsearch
36h with Rust and Kafka
640 queries /s
Cloudflare: HTTP proxy
Cloudflare: HTTP proxy
nginx not fast enough
Cloudflare: HTTP proxy
nginx not fast enough
hard to customize in C
Cloudflare: HTTP proxy
nginx not fast enough
hard to customize in C
allows to share connections between threads
Cloudflare: HTTP proxy
nginx not fast enough
hard to customize in C
allows to share connections between threads
= 160x less connections to the origins
Cloudflare: HTTP proxy
nginx not fast enough
hard to customize in C
allows to share connections between threads
= 160x less connections to the origins
= 434 years less handshakes per day
Discord: Message read service
Discord: Message read service
cache of a few billion entries
Discord: Message read service
cache of a few billion entries
every connection, message sent and read...
Discord: Message read service
cache of a few billion entries
every connection, message sent and read...
latences every 2 minutes because of Go Garbage Collector
Discord: Message read service
cache of a few billion entries
every connection, message sent and read...
latences every 2 minutes because of Go Garbage Collector
Cheap
cpu & memory
less bugs
learning curve
less cases to test
Attractive
Attractive
Most admired language according to for 8 years !
StackOverflow
Attractive
Most admired language according to for 8 years !
StackOverflow
Only place where there is more devs available than offers
Growing community
Features
static types
compiled
no GC
compiler developed in Rust
low and high level : zero cost abstraction
no manual memory management : Ownership & Borrow checker
Features
static types
compiled
no GC
compiler developed in Rust
low and high level : zero cost abstraction
no manual memory management : Ownership & Borrow checker
=> There is no blackbox between you and the machine
Features
static types
compiled
no GC
compiler developed in Rust
low and high level : zero cost abstraction
no manual memory management : Ownership & Borrow checker
=> There is no blackbox between you and the machine
=> Better predictability
Features
static types
compiled
no GC
compiler developed in Rust
low and high level : zero cost abstraction
no manual memory management : Ownership & Borrow checker
=> There is no blackbox between you and the machine
=> Better predictability
=> Awesome developer experience
Ownership rules
Ownership rules
Only one variable owns data at a time
Ownership rules
Only one variable owns data at a time
Multiple readers or one writer
Ownership rules
Only one variable owns data at a time
Multiple readers or one writer
=> Memory is freed as soon as variable is out of scope
Ownership rules
Only one variable owns data at a time
Multiple readers or one writer
=> Memory is freed as soon as variable is out of scope
It's like a fundamental problem has been solved
The compiler
fn say(message: String) {
println!("{}", message);
}
fn main() {
let message = String::from("hey");
say(message);
say(message);
}
Tools
cargo test : Integration Tests, Unit Ttests
cargo fmt
cargo bench
clippy : lint
bacon : reload
rust-analyzer : IDE developer experience
Cargo doc stays up to date
cargo doc --open
/// Formats the sum of two numbers as a string.
///
/// # Examples
///
/// ```
/// let result = mycrate::sum_as_string(5, 10);
/// assert_eq!(result, "15");
/// ```
pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() }
1
2
3
4
5
6
7
8
9
Cargo doc stays up to date
cargo doc --open
/// Formats the sum of two numbers as a string.
///
/// # Examples
///
/// ```
/// let result = mycrate::sum_as_string(5, 10);
/// assert_eq!(result, "15");
/// ```
pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() }
1
2
3
4
5
6
7
8
9
/// let result = mycrate::sum_as_string(5, 10);
/// assert_eq!(result, "15");
/// Formats the sum of two numbers as a string.
1
///
2
/// # Examples
3
///
4
/// ```
5
6
7
/// ```
8
pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() }
9
Cargo doc stays up to date
cargo doc --open
/// Formats the sum of two numbers as a string.
///
/// # Examples
///
/// ```
/// let result = mycrate::sum_as_string(5, 10);
/// assert_eq!(result, "15");
/// ```
pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() }
1
2
3
4
5
6
7
8
9
/// let result = mycrate::sum_as_string(5, 10);
/// assert_eq!(result, "15");
/// Formats the sum of two numbers as a string.
1
///
2
/// # Examples
3
///
4
/// ```
5
6
7
/// ```
8
pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() }
9
/// Formats the sum of two numbers as a string.
///
/// # Examples
///
/// ```
/// let result = mycrate::sum_as_string(5, 10);
/// assert_eq!(result, "15");
/// ```
pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() }
1
2
3
4
5
6
7
8
9
Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and Cheap APIs, Zacaria Chtatar, HaveSomeCode
Possible struggles
projects move slower
embrace the paradigm
takes 3 to 6 months to become productive
build time
work with external libraries
ecosystem calmer than JS
Project lifetime
In other languages simple things are easy and complex
things are possible, in Rust simple things are possible
and complex things are EASY.
Get started as dev
- reference
- condensed reference
- exercises
- quick walkthrough
- complete walkthrough
- quick videos
- longer videos
- Youtube & paid bootcamp - not sponsored
- keywords discovery
- keywords discovery
Rust book
Rust by example
Rustlings
A half-hour to learn Rust
Comprehensive Rust by Google
Noboilerplate
Code to the moon
Let's get rusty
Awesome Rust
Roadmap
Get started as manager
Get started as manager
find dev interested in Rust: there are a lot
Get started as manager
find dev interested in Rust: there are a lot
start with simple projects:
CLI
lambdas
microservice
network app
devops tools
Get started as manager
find dev interested in Rust: there are a lot
start with simple projects:
CLI
lambdas
microservice
network app
devops tools
Make the world a safer, faster and sustainable place
Thank you
Slides :
-
https://havesome-rust-apidays.surge.sh
@ChtatarZacaria havesomecode.io
Q&A
Governance
Release every 6 weeks
Backward compatibility
Breaking changes are opt-in thanks to
Rust Project
Rust Foundation
editions

More Related Content

PDF
The Rust Programming Language 2nd Edition Second Converted Steve Klabnik Caro...
PDF
Intro to Rust 2019
PPTX
Rust Intro
PDF
Rust and Eclipse
PDF
Le langage rust
PDF
The Rust Programming Language Second Edition 2 Converted Steve Klabnik
PDF
Who go Types in my Systems Programing!
PDF
The Rust Programming Language 2nd Edition Steve Klabnik
The Rust Programming Language 2nd Edition Second Converted Steve Klabnik Caro...
Intro to Rust 2019
Rust Intro
Rust and Eclipse
Le langage rust
The Rust Programming Language Second Edition 2 Converted Steve Klabnik
Who go Types in my Systems Programing!
The Rust Programming Language 2nd Edition Steve Klabnik

Similar to Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and Cheap APIs, Zacaria Chtatar, HaveSomeCode (20)

PDF
The Rust Programming Language 2nd Edition Steve Klabnik
PDF
Learning Rust with Advent of Code 2023 - Princeton
PDF
Rust All Hands Winter 2011
PPTX
Rust presentation convergeconf
PDF
Short intro to the Rust language
PDF
Rust Intro @ Roma Rust meetup
PDF
The Rust Programming Language Steve Klabnik
PDF
Rust: Systems Programming for Everyone
PDF
Download Complete The Rust Programming Language 2nd Edition Steve Klabnik PDF...
PDF
The Rust Programming Language: an Overview
PPTX
Rust Melbourne MeetUp - Rust Web Development
PDF
An introduction to Rust: the modern programming language to develop safe and ...
PDF
The Rust Programming Language
PDF
The Rust Programming Language, Second Edition Steve Klabnik
PDF
Introduction to the rust programming language
PDF
Rust for professionals.pdf
PDF
Introduction to rust: a low-level language with high-level abstractions
ODP
Rust Primer
PDF
I don't know what I'm Doing: A newbie guide for Golang for DevOps
The Rust Programming Language 2nd Edition Steve Klabnik
Learning Rust with Advent of Code 2023 - Princeton
Rust All Hands Winter 2011
Rust presentation convergeconf
Short intro to the Rust language
Rust Intro @ Roma Rust meetup
The Rust Programming Language Steve Klabnik
Rust: Systems Programming for Everyone
Download Complete The Rust Programming Language 2nd Edition Steve Klabnik PDF...
The Rust Programming Language: an Overview
Rust Melbourne MeetUp - Rust Web Development
An introduction to Rust: the modern programming language to develop safe and ...
The Rust Programming Language
The Rust Programming Language, Second Edition Steve Klabnik
Introduction to the rust programming language
Rust for professionals.pdf
Introduction to rust: a low-level language with high-level abstractions
Rust Primer
I don't know what I'm Doing: A newbie guide for Golang for DevOps
Ad

More from apidays (20)

PDF
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
PDF
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
PDF
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
PDF
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
PDF
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
PDF
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
PDF
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
PDF
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
PDF
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
PPTX
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
PPTX
apidays Munich 2025 - Effectively incorporating API Security into the overall...
PPTX
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
PPTX
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
PPTX
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
PPTX
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
PDF
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
PDF
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays Munich 2025 - Effectively incorporating API Security into the overall...
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
Ad

Recently uploaded (20)

PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Computer network topology notes for revision
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Foundation of Data Science unit number two notes
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PDF
Lecture1 pattern recognition............
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
1_Introduction to advance data techniques.pptx
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
Business Acumen Training GuidePresentation.pptx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Qualitative Qantitative and Mixed Methods.pptx
.pdf is not working space design for the following data for the following dat...
Galatica Smart Energy Infrastructure Startup Pitch Deck
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
IBA_Chapter_11_Slides_Final_Accessible.pptx
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Business Ppt On Nestle.pptx huunnnhhgfvu
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Computer network topology notes for revision
Introduction-to-Cloud-ComputingFinal.pptx
Foundation of Data Science unit number two notes
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Lecture1 pattern recognition............
Supervised vs unsupervised machine learning algorithms
1_Introduction to advance data techniques.pptx
ISS -ESG Data flows What is ESG and HowHow
STUDY DESIGN details- Lt Col Maksud (21).pptx
Business Acumen Training GuidePresentation.pptx

Apidays Paris 2023 - Forget TypeScript, Choose Rust to build Robust, Fast and Cheap APIs, Zacaria Chtatar, HaveSomeCode

  • 1. API Days Paris Zacaria Chtatar - December 2023 https://havesome-rust-apidays.surge.sh
  • 6. Forget TypeScript Choose Rust to build Robust, Fast and Cheap APIs
  • 8. 2009 JS lives in the browser
  • 9. Until Nodejs V8 engine, modules system & NPM modules boom of easy to reuse code fullstack JS : Easy to start with, hard to master
  • 10. Fullstack paradigm clash between static and dynamic JS doesn't help you follow strict API interfaces
  • 11. Fullstack paradigm clash between static and dynamic JS doesn't help you follow strict API interfaces
  • 12. TypeScript Benefits: IDE Developer experience OOP patterns compiler checks type system => better management of big codebase
  • 13. Pain points does not save you from dealing with JS adds types management adds static layer onto dynamic layer
  • 14. Pain points does not save you from dealing with JS adds types management adds static layer onto dynamic layer JSDoc answers to the precise problem of hinting types without getting in your way
  • 16. Stakes Needs worldwide scale privacy market competition environment human lives scalability security functionality computation time memory footprint safety
  • 17. Stakes Needs worldwide scale privacy market competition environment human lives scalability security functionality computation time memory footprint safety TypeScript is not enough
  • 18. Introducing Rust Fast, Reliable, Productive: pick three
  • 21. enums struct FakeCat { alive: bool, hungry: bool, } let zombie = FakeCat { alive: false, hungry: true }; // ???
  • 22. enums struct FakeCat { alive: bool, hungry: bool, } let zombie = FakeCat { alive: false, hungry: true }; // ??? Rust makes it easy to make invalid state unrepresentable
  • 23. enums struct FakeCat { alive: bool, hungry: bool, } let zombie = FakeCat { alive: false, hungry: true }; // ??? Rust makes it easy to make invalid state unrepresentable enum RealCat { Alive { hungry: bool }, // enums can contain structs Dead, } let cat = RealCat::Alive { hungry: true }; let dead_cat = RealCat::Dead;
  • 24. Option enum // full code of the solution to the billion dollar mistake // included in the standard library enum Option<T> { None, Some(T), } let item: Option<Item> = get_item(); match item { Some(item) => map_item(item), None => handle_none_case(), // does not compile if omitted }
  • 25. What is wrong with this function ? function getConfig(path: string): string { return fs.readFileSync(path); }
  • 26. What is wrong with this function ? function getConfig(path: string): string { return fs.readFileSync(path); } There is no hint that readFileSync can throw an error under some conditions
  • 27. Result enum enum Result<T, E> { Ok(T), Err(E), } fn get_config(path: &str) -> Result<String, io::Error> { fs::read_to_string(path) } // That's a shortcut, don't send me to prod ! fn dirty_get_config(path: &str) -> String { fs::read_to_string(path).unwrap() // panics in case of error }
  • 28. Result enum enum Result<T, E> { Ok(T), Err(E), } fn get_config(path: &str) -> Result<String, io::Error> { fs::read_to_string(path) } // That's a shortcut, don't send me to prod ! fn dirty_get_config(path: &str) -> String { fs::read_to_string(path).unwrap() // panics in case of error } We need to clarify what can go wrong
  • 29. Result enum enum Result<T, E> { Ok(T), Err(E), } fn get_config(path: &str) -> Result<String, io::Error> { fs::read_to_string(path) } // That's a shortcut, don't send me to prod ! fn dirty_get_config(path: &str) -> String { fs::read_to_string(path).unwrap() // panics in case of error } We need to clarify what can go wrong It's even better when it's embedded in the language
  • 30. 2016 : Do you remember the ? le -pad incident Source
  • 31. crates.io no crate (package) unpublish can disable crate only for new projects
  • 34. Linux: The Kernel attract young devs 2/3 of vunerabilities come from memory management
  • 35. Linux: The Kernel attract young devs 2/3 of vunerabilities come from memory management Kernel is in C and Assembly
  • 36. Linux: The Kernel attract young devs 2/3 of vunerabilities come from memory management Kernel is in C and Assembly Linus Torvalds : C++
  • 37. Fast
  • 38. 2017 : Energy efficiency accross programing languages
  • 39. Github: 45 million repos 28 TB of unique content Code Search index
  • 40. Github: 45 million repos 28 TB of unique content Code Search index several months with Elasticsearch 36h with Rust and Kafka 640 queries /s
  • 42. Cloudflare: HTTP proxy nginx not fast enough
  • 43. Cloudflare: HTTP proxy nginx not fast enough hard to customize in C
  • 44. Cloudflare: HTTP proxy nginx not fast enough hard to customize in C allows to share connections between threads
  • 45. Cloudflare: HTTP proxy nginx not fast enough hard to customize in C allows to share connections between threads = 160x less connections to the origins
  • 46. Cloudflare: HTTP proxy nginx not fast enough hard to customize in C allows to share connections between threads = 160x less connections to the origins = 434 years less handshakes per day
  • 48. Discord: Message read service cache of a few billion entries
  • 49. Discord: Message read service cache of a few billion entries every connection, message sent and read...
  • 50. Discord: Message read service cache of a few billion entries every connection, message sent and read... latences every 2 minutes because of Go Garbage Collector
  • 51. Discord: Message read service cache of a few billion entries every connection, message sent and read... latences every 2 minutes because of Go Garbage Collector
  • 52. Cheap
  • 53. cpu & memory less bugs learning curve less cases to test
  • 55. Attractive Most admired language according to for 8 years ! StackOverflow
  • 56. Attractive Most admired language according to for 8 years ! StackOverflow Only place where there is more devs available than offers
  • 58. Features static types compiled no GC compiler developed in Rust low and high level : zero cost abstraction no manual memory management : Ownership & Borrow checker
  • 59. Features static types compiled no GC compiler developed in Rust low and high level : zero cost abstraction no manual memory management : Ownership & Borrow checker => There is no blackbox between you and the machine
  • 60. Features static types compiled no GC compiler developed in Rust low and high level : zero cost abstraction no manual memory management : Ownership & Borrow checker => There is no blackbox between you and the machine => Better predictability
  • 61. Features static types compiled no GC compiler developed in Rust low and high level : zero cost abstraction no manual memory management : Ownership & Borrow checker => There is no blackbox between you and the machine => Better predictability => Awesome developer experience
  • 63. Ownership rules Only one variable owns data at a time
  • 64. Ownership rules Only one variable owns data at a time Multiple readers or one writer
  • 65. Ownership rules Only one variable owns data at a time Multiple readers or one writer => Memory is freed as soon as variable is out of scope
  • 66. Ownership rules Only one variable owns data at a time Multiple readers or one writer => Memory is freed as soon as variable is out of scope It's like a fundamental problem has been solved
  • 67. The compiler fn say(message: String) { println!("{}", message); } fn main() { let message = String::from("hey"); say(message); say(message); }
  • 68. Tools cargo test : Integration Tests, Unit Ttests cargo fmt cargo bench clippy : lint bacon : reload rust-analyzer : IDE developer experience
  • 69. Cargo doc stays up to date cargo doc --open /// Formats the sum of two numbers as a string. /// /// # Examples /// /// ``` /// let result = mycrate::sum_as_string(5, 10); /// assert_eq!(result, "15"); /// ``` pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() } 1 2 3 4 5 6 7 8 9
  • 70. Cargo doc stays up to date cargo doc --open /// Formats the sum of two numbers as a string. /// /// # Examples /// /// ``` /// let result = mycrate::sum_as_string(5, 10); /// assert_eq!(result, "15"); /// ``` pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() } 1 2 3 4 5 6 7 8 9 /// let result = mycrate::sum_as_string(5, 10); /// assert_eq!(result, "15"); /// Formats the sum of two numbers as a string. 1 /// 2 /// # Examples 3 /// 4 /// ``` 5 6 7 /// ``` 8 pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() } 9
  • 71. Cargo doc stays up to date cargo doc --open /// Formats the sum of two numbers as a string. /// /// # Examples /// /// ``` /// let result = mycrate::sum_as_string(5, 10); /// assert_eq!(result, "15"); /// ``` pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() } 1 2 3 4 5 6 7 8 9 /// let result = mycrate::sum_as_string(5, 10); /// assert_eq!(result, "15"); /// Formats the sum of two numbers as a string. 1 /// 2 /// # Examples 3 /// 4 /// ``` 5 6 7 /// ``` 8 pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() } 9 /// Formats the sum of two numbers as a string. /// /// # Examples /// /// ``` /// let result = mycrate::sum_as_string(5, 10); /// assert_eq!(result, "15"); /// ``` pub fn sum_as_string(a: i32, b: i32) -> String { (a + b).to_string() } 1 2 3 4 5 6 7 8 9
  • 73. Possible struggles projects move slower embrace the paradigm takes 3 to 6 months to become productive build time work with external libraries ecosystem calmer than JS
  • 75. In other languages simple things are easy and complex things are possible, in Rust simple things are possible and complex things are EASY.
  • 76. Get started as dev - reference - condensed reference - exercises - quick walkthrough - complete walkthrough - quick videos - longer videos - Youtube & paid bootcamp - not sponsored - keywords discovery - keywords discovery Rust book Rust by example Rustlings A half-hour to learn Rust Comprehensive Rust by Google Noboilerplate Code to the moon Let's get rusty Awesome Rust Roadmap
  • 77. Get started as manager
  • 78. Get started as manager find dev interested in Rust: there are a lot
  • 79. Get started as manager find dev interested in Rust: there are a lot start with simple projects: CLI lambdas microservice network app devops tools
  • 80. Get started as manager find dev interested in Rust: there are a lot start with simple projects: CLI lambdas microservice network app devops tools Make the world a safer, faster and sustainable place
  • 82. Q&A
  • 83. Governance Release every 6 weeks Backward compatibility Breaking changes are opt-in thanks to Rust Project Rust Foundation editions