SlideShare a Scribd company logo
API Days Paris
Zacaria Chtatar - December 2023
https://havesome-rust-apidays.surge.sh
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
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
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

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

Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Codemotion
 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
Doug Jones
 
Node js presentation
Node js presentationNode js presentation
Node js presentationmartincabrera
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Amazon Web Services
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandrarantav
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Manuel Bernhardt
 
Fluentd unified logging layer
Fluentd   unified logging layerFluentd   unified logging layer
Fluentd unified logging layer
Kiyoto Tamura
 
Book
BookBook
Book
luis_lmro
 
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016 A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
Databricks
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
Sadayuki Furuhashi
 
MLflow with R
MLflow with RMLflow with R
MLflow with R
Databricks
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
Mike Desjardins
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage coding
Max Kleiner
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
jvm goes to big data
jvm goes to big datajvm goes to big data
jvm goes to big data
srisatish ambati
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the restgeorge.james
 
Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...
Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...
Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...
HostedbyConfluent
 

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

A Life of breakpoint
A Life of breakpointA Life of breakpoint
A Life of breakpoint
 
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
Why Rust? - Matthias Endler - Codemotion Amsterdam 2016
 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
 
Node js presentation
Node js presentationNode js presentation
Node js presentation
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
 
Odp
OdpOdp
Odp
 
NOSQL and Cassandra
NOSQL and CassandraNOSQL and Cassandra
NOSQL and Cassandra
 
C tutorials
C tutorialsC tutorials
C tutorials
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
Fluentd unified logging layer
Fluentd   unified logging layerFluentd   unified logging layer
Fluentd unified logging layer
 
Book
BookBook
Book
 
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016 A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
MLflow with R
MLflow with RMLflow with R
MLflow with R
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage coding
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
jvm goes to big data
jvm goes to big datajvm goes to big data
jvm goes to big data
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...
Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...
Building Kafka Connectors with Kotlin: A Step-by-Step Guide to Creation and D...
 

More from apidays

Apidays Helsinki 2024 - APIs ahoy, the case of Customer Booking APIs in Finn...
Apidays Helsinki 2024 -  APIs ahoy, the case of Customer Booking APIs in Finn...Apidays Helsinki 2024 -  APIs ahoy, the case of Customer Booking APIs in Finn...
Apidays Helsinki 2024 - APIs ahoy, the case of Customer Booking APIs in Finn...
apidays
 
Apidays Helsinki 2024 - From Chaos to Calm- Navigating Emerging API Security...
Apidays Helsinki 2024 -  From Chaos to Calm- Navigating Emerging API Security...Apidays Helsinki 2024 -  From Chaos to Calm- Navigating Emerging API Security...
Apidays Helsinki 2024 - From Chaos to Calm- Navigating Emerging API Security...
apidays
 
Apidays Helsinki 2024 - What is next now that your organization created a (si...
Apidays Helsinki 2024 - What is next now that your organization created a (si...Apidays Helsinki 2024 - What is next now that your organization created a (si...
Apidays Helsinki 2024 - What is next now that your organization created a (si...
apidays
 
Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...
Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...
Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...
apidays
 
Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...
Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...
Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...
apidays
 
Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...
Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...
Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...
apidays
 
Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...
Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...
Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...
apidays
 
Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...
Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...
Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...
apidays
 
Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...
Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...
Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...
apidays
 
Apidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, Osaango
Apidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, OsaangoApidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, Osaango
Apidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, Osaango
apidays
 
Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...
Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...
Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...
apidays
 
Apidays New York 2024 - The subtle art of API rate limiting by Josh Twist, Zuplo
Apidays New York 2024 - The subtle art of API rate limiting by Josh Twist, ZuploApidays New York 2024 - The subtle art of API rate limiting by Josh Twist, Zuplo
Apidays New York 2024 - The subtle art of API rate limiting by Josh Twist, Zuplo
apidays
 
Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...
Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...
Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...
apidays
 
Apidays New York 2024 - Putting AI into API Security by Corey Ball, Moss Adams
Apidays New York 2024 - Putting AI into API Security by Corey Ball, Moss AdamsApidays New York 2024 - Putting AI into API Security by Corey Ball, Moss Adams
Apidays New York 2024 - Putting AI into API Security by Corey Ball, Moss Adams
apidays
 
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
apidays
 
Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...
Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...
Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...
apidays
 
Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...
Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...
Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...
apidays
 
Apidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, Danone
Apidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, DanoneApidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, Danone
Apidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, Danone
apidays
 
Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...
Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...
Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...
apidays
 
Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...
Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...
Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...
apidays
 

More from apidays (20)

Apidays Helsinki 2024 - APIs ahoy, the case of Customer Booking APIs in Finn...
Apidays Helsinki 2024 -  APIs ahoy, the case of Customer Booking APIs in Finn...Apidays Helsinki 2024 -  APIs ahoy, the case of Customer Booking APIs in Finn...
Apidays Helsinki 2024 - APIs ahoy, the case of Customer Booking APIs in Finn...
 
Apidays Helsinki 2024 - From Chaos to Calm- Navigating Emerging API Security...
Apidays Helsinki 2024 -  From Chaos to Calm- Navigating Emerging API Security...Apidays Helsinki 2024 -  From Chaos to Calm- Navigating Emerging API Security...
Apidays Helsinki 2024 - From Chaos to Calm- Navigating Emerging API Security...
 
Apidays Helsinki 2024 - What is next now that your organization created a (si...
Apidays Helsinki 2024 - What is next now that your organization created a (si...Apidays Helsinki 2024 - What is next now that your organization created a (si...
Apidays Helsinki 2024 - What is next now that your organization created a (si...
 
Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...
Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...
Apidays Helsinki 2024 - There’s no AI without API, but what does this mean fo...
 
Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...
Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...
Apidays Helsinki 2024 - Sustainable IT and API Performance - How to Bring The...
 
Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...
Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...
Apidays Helsinki 2024 - Security Vulnerabilities in your APIs by Lukáš Ďurovs...
 
Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...
Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...
Apidays Helsinki 2024 - Data, API’s and Banks, with AI on top by Sergio Giral...
 
Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...
Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...
Apidays Helsinki 2024 - Data Ecosystems Driving the Green Transition by Olli ...
 
Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...
Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...
Apidays Helsinki 2024 - Bridging the Gap Between Backend and Frontend API Tes...
 
Apidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, Osaango
Apidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, OsaangoApidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, Osaango
Apidays Helsinki 2024 - API Compliance by Design by Marjukka Niinioja, Osaango
 
Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...
Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...
Apidays Helsinki 2024 - ABLOY goes API economy – Transformation story by Hann...
 
Apidays New York 2024 - The subtle art of API rate limiting by Josh Twist, Zuplo
Apidays New York 2024 - The subtle art of API rate limiting by Josh Twist, ZuploApidays New York 2024 - The subtle art of API rate limiting by Josh Twist, Zuplo
Apidays New York 2024 - The subtle art of API rate limiting by Josh Twist, Zuplo
 
Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...
Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...
Apidays New York 2024 - RESTful API Patterns and Practices by Mike Amundsen, ...
 
Apidays New York 2024 - Putting AI into API Security by Corey Ball, Moss Adams
Apidays New York 2024 - Putting AI into API Security by Corey Ball, Moss AdamsApidays New York 2024 - Putting AI into API Security by Corey Ball, Moss Adams
Apidays New York 2024 - Putting AI into API Security by Corey Ball, Moss Adams
 
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...Apidays New York 2024 - Prototype-first - A modern API development workflow b...
Apidays New York 2024 - Prototype-first - A modern API development workflow b...
 
Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...
Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...
Apidays New York 2024 - Post-Quantum API Security by Francois Lascelles, Broa...
 
Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...
Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...
Apidays New York 2024 - Increase your productivity with no-code GraphQL mocki...
 
Apidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, Danone
Apidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, DanoneApidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, Danone
Apidays New York 2024 - Driving API & EDA Success by Marcelo Caponi, Danone
 
Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...
Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...
Apidays New York 2024 - Build a terrible API for people you hate by Jim Benne...
 
Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...
Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...
Apidays New York 2024 - API Secret Tokens Exposed by Tristan Kalos and Antoin...
 

Recently uploaded

Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 

Recently uploaded (20)

Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 

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
  • 2.
  • 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
  • 20.
  • 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
  • 72.
  • 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