SlideShare a Scribd company logo
1 of 83
Download to read offline
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 2016Codemotion
 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced BasicsDoug 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 JVMManuel Bernhardt
 
Fluentd unified logging layer
Fluentd   unified logging layerFluentd   unified logging layer
Fluentd unified logging layerKiyoto Tamura
 
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 EraSadayuki Furuhashi
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingMax 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 YardSV Ruby on Rails Meetup
 
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 Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays
 
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays
 
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays
 
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays
 
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays
 
apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays
 
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays
 
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays
 
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays
 
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays
 
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays
 
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays
 
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...apidays
 
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOApidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOapidays
 
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...apidays
 
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...apidays
 
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...apidays
 
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...apidays
 
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...apidays
 
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...apidays
 

More from apidays (20)

apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...apidays Australia 2023 - A programmatic approach to API success including Ope...
apidays Australia 2023 - A programmatic approach to API success including Ope...
 
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile APIapidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
apidays Singapore 2023 - Addressing the Data Gap, Jerome Eger, Smile API
 
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wiseapidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
apidays Singapore 2023 - Iterate Faster with Dynamic Flows, Yee Hui Poh, Wise
 
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Venturesapidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
apidays Singapore 2023 - Banking the Ecosystem, Apurv Suri, SC Ventures
 
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
apidays Singapore 2023 - Digitalising agreements with data, design & technolo...
 
apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...apidays Singapore 2023 - Building a digital-first investment management model...
apidays Singapore 2023 - Building a digital-first investment management model...
 
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
apidays Singapore 2023 - Changing the culture of building software, Aman Dham...
 
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
apidays Singapore 2023 - Connecting the trade ecosystem, CHOO Wai Yee, Singap...
 
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBMapidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
apidays Singapore 2023 - Beyond REST, Claudio Tag, IBM
 
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
apidays Singapore 2023 - Securing and protecting our digital way of life, Ver...
 
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartnerapidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
apidays Singapore 2023 - State of the API Industry, Manjunath Bhat, Gartner
 
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
apidays Australia 2023 - Curb your Enthusiasm:Sustainable Scaling of APIs, Sa...
 
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
Apidays Paris 2023 - API Security Challenges for Cloud-native Software Archit...
 
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IOApidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
Apidays Paris 2023 - State of Tech Sustainability 2023, Gaël Duez, Green IO
 
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
Apidays Paris 2023 - 7 Mistakes When Putting In Place An API Program, Francoi...
 
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
Apidays Paris 2023 - Building APIs That Developers Love: Feedback Collection ...
 
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
Apidays Paris 2023 - Product Managers and API Documentation, Gareth Faull, Lo...
 
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
Apidays Paris 2023 - How to use NoCode as a Microservice, Benjamin Buléon and...
 
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
Apidays Paris 2023 - Boosting Event-Driven Development with AsyncAPI and Micr...
 
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
Apidays Paris 2023 - API Observability: Improving Governance, Security and Op...
 

Recently uploaded

Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...ThinkInnovation
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAbdelrhman abooda
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 

Recently uploaded (20)

Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
Predictive Analysis - Using Insight-informed Data to Determine Factors Drivin...
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptxAmazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
Amazon TQM (2) Amazon TQM (2)Amazon TQM (2).pptx
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 

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