SlideShare a Scribd company logo
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 1/49
RUSTRUST
Be pinched by a cBe pinched by a cRUSTRUSTacean to prevent programmingacean to prevent programming
errors !errors !
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 2/49
2 words about us2 words about us
$ cat ~/.bash_profile
NAME="René Ribaud"
AGE=43
source ./1998.sh
PROFESSION="Unices system and storage" 
"administrator , since 2003"
HISTORY="Lots (too many) infrastructure" 
"implementation projects" 
"Discover Linux & FLOSS between" 
"1995 / 2000" 
"First step in the cloud around 2011" 
", pre-sales solution architect" 
"2014 (Cloud, DevOps)" 
"I’m an Ops !"
COMPANY="CGI 20th November 2017"
JOB="Information system architect" 
"specialized around DevOps technologies"
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 3/49
2 words about us2 words about us
François BestFrançois Best
Freelance Developer
Embedded/Realtime C/C++
background
Seduced by the Dark Side of the Web
Current interests:
Rust (of course)
Security / Cryptography
Decentralisation
Personal data protection
& de-GAFAMing
Github: |
Web:
@franky47
@47ng
francoisbest.com
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 4/49
What is RUST ?What is RUST ?
New systems programming language
Multi paradigm language (imperative, functional, object
oriented (not fully))
By Mozilla and the Community
Dual license MIT and Apache v2.0
First stable release May 15th, 2015
Rust 2018 (v1.31), a major new edition released
December 6th, 2018
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 5/49
Goal ?Goal ?
Provide an alternative to C/C++ and also higher-levelProvide an alternative to C/C++ and also higher-level
languageslanguages
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 6/49
Why is this Ops guy speaking about aWhy is this Ops guy speaking about a
programming language ?programming language ?
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 7/49
Immune to coder disease 1Immune to coder disease 1
My language is the best !My language is the best !
And my code is also the best !And my code is also the best !
This is part of my job to know languages and especially how to build projects usingThis is part of my job to know languages and especially how to build projects using
themthem
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 8/49
Immune to coder disease 2Immune to coder disease 2
I don't make mistakes, only bad coders are making onesI don't make mistakes, only bad coders are making ones
Really, how do you explain all major projects security issues ?Really, how do you explain all major projects security issues ?
I'm fed up about segfaults and null pointer exceptions !I'm fed up about segfaults and null pointer exceptions !
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 9/49
Why is RUST exciting to me ?Why is RUST exciting to me ?
And probably why should you look at it ?And probably why should you look at it ?
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 10/49
PromisesPromises
Focus on safety -> avoids errors and helps finding them
!
Especially safe concurrency
Fast, really fast !
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 11/49
But alsoBut also
Compiled language, few runtime dependencies
Produces binaries, that could be static with musl
Can interact easily with other languages via ABI and
bindings (Python, C/C++, JS...)
State of mind, hard at compile time, but safe at runtime
Somewhere challenging !
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 12/49
Ripgrep (rg)Ripgrep (rg)
An application written in RustAn application written in Rust
A grep enhanced
Compatible with standard grep
Search speed is really
impressive
Look also at fd, exa, lsd...
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 13/49
And a cute mascot !And a cute mascot !
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 14/49
What it looks likeWhat it looks like
extern crate flate2;
use flate2::read::GzDecoder;
use std::fs::File;
use std::io::Read;
fn run() -> String {
let path = "ascii.txt.gz";
let mut contents = String::new();
let gz = File::open(path).unwrap(); // open and decompress file
let mut uncompress = GzDecoder::new(gz);
uncompress.read_to_string(&mut contents).unwrap();
contents // return implicitly contents
}
fn main() {
println!("Hello, world!");
let result = run(); // call run function
println!("{}", result); // display compress file content
}
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 15/49
Language featuresLanguage features
Static type system with local type
inference
Explicit mutability
Zero-cost abstractions
Runtime-independent concurrency safety
Errors are values
No null
Static automatic memory management
No garbage collection
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 16/49
Safety is achieved by mainly 3 conceptsSafety is achieved by mainly 3 concepts
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 17/49
MutabilityMutability
struct Bike {
speed: u32,
distance: u32,
brand: String,
}
fn main() {
let mybike = Bike {
speed: 25,
distance: 1508,
brand: "Liteville".to_string(),
};
mybike.speed = 30; //Reassign !!!
println!(
"Bike {}: speed={} distance={}",
mybike.brand, mybike.speed, mybike.distance
);
}
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 18/49
Mutability errorMutability error
error[E0594]: cannot assign to field `mybike.speed` of immutable binding
--> src/main.rs:14:5
|
8 | let mybike = Bike {
| ------ help: make this binding mutable: `mut mybike`
...
14 | mybike.speed = 30; //Reassign !!!
| ^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding
error: aborting due to previous error
For more information about this error, try `rustc --explain E0594`.
error: Could not compile `immutability`.
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 19/49
Ownership & BorrowingOwnership & Borrowing
Every piece of data is uniquely owned
Ownership can be passed
When owned data reaches the end of a scope, it is
destroyed
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 20/49
OwnershipOwnership
fn main() {
let s1 = String::from("Hello, RUST ! 🦀");
let s2 = s1;
println!("{}", s1);
}
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 21/49
Ownership errorOwnership error
--> src/main.rs:3:9
|
3 | let s2 = s1;
|
= note: #[warn(unused_variables)] on by default
error[E0382]: borrow of moved value: `s1`
--> src/main.rs:4:20
|
3 | let s2 = s1;
| -- value moved here
4 | println!("{}", s1);
| ^^ value borrowed here after move
|
= note: move occurs because `s1` has type
`std::string::String`, which does not implement the `Copy` trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.
error: Could not compile `owned2`.
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 22/49
OwnershipOwnership
fn main() {
let s = String::from("Hello, RUST ! 🦀");
display(s);
display(s); // Already owned !
}
fn display(some_string: String) {
println!("{}", some_string);
}
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 23/49
Ownership errorOwnership error
error[E0382]: use of moved value: `s`
--> src/main.rs:5:13
|
4 | display(s);
| - value moved here
5 | display(s); // Already owned !
| ^ value used here after move
|
= note: move occurs because `s` has type `std::string::String`,
which does not implement the `Copy` trait
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 24/49
Ownership & BorrowingOwnership & Borrowing
Access can be borrowed (mutable and
immutable)
You can borrow mutably once
Or multiple times immutably
Exclusive: mutable or immutable, never both
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 25/49
BorrowingBorrowing
fn main() {
let s = String::from("Hello, RUST ! 🦀");
display(&s);
display(&s);
}
fn display(some_string: &String) {
println!("{}", some_string);
}
Hello, RUST ! 🦀
Hello, RUST ! 🦀
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 26/49
Borrowing mutableBorrowing mutable
fn main() {
let s = String::from("Hello");
change(&s);
println!("{}", s);
}
fn change(some_string: &String) {
some_string.push_str(", RUST ! 🦀");
}
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 27/49
Borrowing mutable errorBorrowing mutable error
error[E0596]: cannot borrow immutable borrowed content `*some_string` as mutable
--> src/main.rs:9:5
|
8 | fn change(some_string: &String) {
| ------- use `&mut String` here to make mutable
9 | some_string.push_str(", RUST ! 🦀");
| ^^^^^^^^^^^ cannot borrow as mutable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0596`.
error: Could not compile `borrow_mut`.
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 28/49
Borrowing mutable fixedBorrowing mutable fixed
fn main() {
let mut s = String::from("Hello");
change(&mut s);
println!("{}", s);
}
fn change(some_string: &mut String) {
some_string.push_str(", RUST ! 🦀");
}
Hello, RUST ! 🦀
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 29/49
References validity checksReferences validity checks
#[derive(Debug)]
struct Person<'a> {
first_name: &'a str,
last_name: &'a str,
age: &'a i32,
phone: Vec<&'a str>,
}
fn return_reference<'a>() -> Person<'a> {
let age = 25;
Person {
first_name: "John",
last_name: "Doe",
age: &age,
phone: vec!["123-123", "456-456"],
}
}
fn main() {
let person = return_reference();
println!("{:?}", person);
}
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 30/49
References validity checks errorReferences validity checks error
error[E0597]: `age` does not live long enough
--> src/main.rs:15:15
|
15 | age: &age,
| ^^^ borrowed value does not live long enough
...
18 | }
| - borrowed value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function
body at 9:1...
--> src/main.rs:9:1
|
9 | fn return_reference<'a>() -> Person<'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 31/49
Concurrency without fearConcurrency without fear
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 32/49
Concurrency without fearConcurrency without fear
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 33/49
Concurrency without fear errorConcurrency without fear error
Rust type system allows no data racesRust type system allows no data races
error[E0596]: cannot borrow `words` as mutable, as it is a captured variable
in a `Fn` closure
--> src/main.rs:19:54
|
19 | .for_each(|arg| tally_words(arg.to_string(), &mut words).unwrap());
| ^^^^^^^^^^ cannot borrow
as mutable
|
help: consider changing this to accept closures that implement `FnMut`
--> src/main.rs:19:19
|
19 | .for_each(|arg| tally_words(arg.to_string(), &mut words).unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0596`.
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 34/49
High level abstractionHigh level abstraction
Generics and TraitsGenerics and Traits
Define shared behavior
Define behavior based on types
Define behavior from various types with trait
bounds
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 35/49
Unsafe RustUnsafe Rust
Allow to disengage some safety features
Use at your own risk !
Crates using unsafe code can be audited with cargo-
geiger
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 36/49
A modern languageA modern language
with builtin code quality standardswith builtin code quality standards
Documentation embedded into code
Unit tests
Integration tests
Great documentation (books and std
lib)
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 37/49
A modern languageA modern language
with tools to be productivewith tools to be productive
Environment setup and update rustup
Package (crates) management cargo + plugin
Code formatting rustfmt
Compiler rustc
Efficient error messages
Potential solution
Linter clippy
Code completion racer
Help transition to 2018 edition rustfix
Editor integration (IntelliJ, Vs code, Vim,
Emacs...)
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 38/49
Opinionated for productivityOpinionated for productivity
Avoiding bikesheddingAvoiding bikeshedding
Crates have a defined filesystem structure
Modules & exports based on file location (like Python)
But with control over public / private exports (like
ES6)
Batteries included, but replaceable
Procedural macros for DSLs (eg: JSON, CSS...)
Custom compile-time extensions with build scripts
Cargo extensions with cargo-foo binary crates
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 39/49
Interesting cratesInteresting crates
That extend the std libThat extend the std lib
Date and time management chrono
Parallel iteration rayon
HTTP client reqwest
Command line parsing clap, docopt,
structopt
Logging log
Serialization serde
Regular expressions regex
...
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 40/49
Area of useArea of use
Command line tools
Web and network
services
Embedded device, IOT
WebAssembly
Games
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 41/49
Who is using Rust ?Who is using Rust ?
Mozilla, servo project
RedHat, stratis
project
Dropbox
Telenor
Chef
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 42/49
Who is using Rust ?Who is using Rust ?
Ready at dawn
Chucklefish that published Stardew Valley and Starbound,
is using Rust in their new projects Wargroove and
Witchbrook to get safe concurrency and portability
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 43/49
Who is using Rust ?Who is using Rust ?
Clevercloud, (Geoffroy Couprie)
nom, parser
Sozu, reverse proxy
Snips
ANSSI: RFC for secure application design in
Rust
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 44/49
Governance and communityGovernance and community
Rust is pragmaticRust is pragmatic
All features are driven by needs of real software
The language is evolved with user feedback
Consciously chooses familiar constructs
Picks good ideas from others
Doesn’t want to be the primary language at all
cost
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 45/49
Governance and communityGovernance and community
Beloved language and communityBeloved language and community
Voted "Most loved language" on Stackoverflow 2018,
2017, 2016
Only 1/100 of survey respondents have issues with the
Rust community
Newcomers from all directions
https://insights.stackoverflow.com/survey/2018/#most-loved-dreaded-and-wantedhttps://insights.stackoverflow.com/survey/2018/#most-loved-dreaded-and-wanted
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 46/49
Governance and communityGovernance and community
growthgrowth
https://8-p.info/visualizing-crates-io/https://8-p.info/visualizing-crates-io/
Crates.ioCrates.io
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 47/49
Governance and communityGovernance and community
Help from the communityHelp from the community
Lots of books
IRC and Discord
channels
User forum
Youtube channel
Meetups
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 48/49
Governance and communityGovernance and community
Beloved language and communityBeloved language and community
Experience from Mozilla to drive open projects
All major decisions, go to an open Request For
Comments process
Release every 6 weeks
3 channels: stable, beta and nightly
Medium time to merged PR for changes: 6 days!
More then 4/5 of contributions to the Rust language come
from outside Mozilla
The compiler has more then 2000 contributors
3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 49/49
THANK YOUTHANK YOU
René Ribaud <rene.ribaud@cgi.com>
François Best
<contact@francoisbest.com>

More Related Content

What's hot

Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmers
xSawyer
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
Tiago Peczenyj
 
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf Conference
 
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
Puppet
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
Owen Hsu
 
How to build a slack-hubot with js
How to build a slack-hubot with jsHow to build a slack-hubot with js
How to build a slack-hubot with js
Juneyoung Oh
 
Composer the right way - SunshinePHP
Composer the right way - SunshinePHPComposer the right way - SunshinePHP
Composer the right way - SunshinePHP
Rafael Dohms
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussin
eurobsdcon
 
To swiftly go where no OS has gone before
To swiftly go where no OS has gone beforeTo swiftly go where no OS has gone before
To swiftly go where no OS has gone before
Paul Ardeleanu
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRuby
Frederic Jean
 
Connecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with EmbindConnecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with Embind
Chad Austin
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to you
guestdd9d06
 
Webinar - Windows Application Management with Puppet
Webinar - Windows Application Management with PuppetWebinar - Windows Application Management with Puppet
Webinar - Windows Application Management with Puppet
OlinData
 

What's hot (13)

Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmers
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
ZFConf 2012: Capistrano для деплоймента PHP-приложений (Роман Лапин)
 
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
The Puppet Debugging Kit: Building Blocks for Exploration and Problem Solving...
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
 
How to build a slack-hubot with js
How to build a slack-hubot with jsHow to build a slack-hubot with js
How to build a slack-hubot with js
 
Composer the right way - SunshinePHP
Composer the right way - SunshinePHPComposer the right way - SunshinePHP
Composer the right way - SunshinePHP
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussin
 
To swiftly go where no OS has gone before
To swiftly go where no OS has gone beforeTo swiftly go where no OS has gone before
To swiftly go where no OS has gone before
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRuby
 
Connecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with EmbindConnecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with Embind
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to you
 
Webinar - Windows Application Management with Puppet
Webinar - Windows Application Management with PuppetWebinar - Windows Application Management with Puppet
Webinar - Windows Application Management with Puppet
 

Similar to Be pinched by a cRUSTacean to prevent programming errors !

Docker6anniversary
Docker6anniversaryDocker6anniversary
Docker6anniversary
René Ribaud
 
How we manage React Microfrontends at JobMatchMe
How we manage React Microfrontends at JobMatchMeHow we manage React Microfrontends at JobMatchMe
How we manage React Microfrontends at JobMatchMe
Felix Kühl
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineering
jtdudley
 
State of Web APIs 2017
State of Web APIs 2017State of Web APIs 2017
State of Web APIs 2017
Carsten Sandtner
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Ruby Meditation
 
Building Bricks with MRuby: A Journey to MRuby on LEGO Robots
Building Bricks with MRuby: A Journey to MRuby on LEGO RobotsBuilding Bricks with MRuby: A Journey to MRuby on LEGO Robots
Building Bricks with MRuby: A Journey to MRuby on LEGO Robots
Torsten Schönebaum
 
Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.
John Dalziel
 
MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)
MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)
MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)
Alexandre Borges
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!
cloudbring
 
Pushing Swift to the Server
Pushing Swift to the ServerPushing Swift to the Server
Pushing Swift to the Server
ibmmobile
 
Infrastructure as Software - PuppetConf 2014
Infrastructure as Software - PuppetConf 2014Infrastructure as Software - PuppetConf 2014
Infrastructure as Software - PuppetConf 2014
Puppet
 
Software Development Automation With Scripting Languages
Software Development Automation With Scripting LanguagesSoftware Development Automation With Scripting Languages
Software Development Automation With Scripting Languages
Ionela
 
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the ServerSwift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
Chris Bailey
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Marc Müller
 
Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)
Alex Cachia
 
Eta lang Beauty And The Beast
Eta lang Beauty And The Beast Eta lang Beauty And The Beast
Eta lang Beauty And The Beast
Jarek Ratajski
 
Raising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityRaising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code Quality
Thomas Moulard
 
The New Three Musketeers–onecics4all-Isabel Arnold
The New Three Musketeers–onecics4all-Isabel ArnoldThe New Three Musketeers–onecics4all-Isabel Arnold
The New Three Musketeers–onecics4all-Isabel Arnold
nick_garrod
 
Better Than BASH: Scripting Kotlin
Better Than BASH: Scripting KotlinBetter Than BASH: Scripting Kotlin
Better Than BASH: Scripting Kotlin
VMware Tanzu
 
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersDefcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersAlexandre Moneger
 

Similar to Be pinched by a cRUSTacean to prevent programming errors ! (20)

Docker6anniversary
Docker6anniversaryDocker6anniversary
Docker6anniversary
 
How we manage React Microfrontends at JobMatchMe
How we manage React Microfrontends at JobMatchMeHow we manage React Microfrontends at JobMatchMe
How we manage React Microfrontends at JobMatchMe
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineering
 
State of Web APIs 2017
State of Web APIs 2017State of Web APIs 2017
State of Web APIs 2017
 
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...
 
Building Bricks with MRuby: A Journey to MRuby on LEGO Robots
Building Bricks with MRuby: A Journey to MRuby on LEGO RobotsBuilding Bricks with MRuby: A Journey to MRuby on LEGO Robots
Building Bricks with MRuby: A Journey to MRuby on LEGO Robots
 
Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.
 
MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)
MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)
MODERN MALWARE THREAT: HANDLING OBFUSCATED CODE -- CONFIDENCE CONFERENCE (2019)
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!
 
Pushing Swift to the Server
Pushing Swift to the ServerPushing Swift to the Server
Pushing Swift to the Server
 
Infrastructure as Software - PuppetConf 2014
Infrastructure as Software - PuppetConf 2014Infrastructure as Software - PuppetConf 2014
Infrastructure as Software - PuppetConf 2014
 
Software Development Automation With Scripting Languages
Software Development Automation With Scripting LanguagesSoftware Development Automation With Scripting Languages
Software Development Automation With Scripting Languages
 
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the ServerSwift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
 
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
Microsoft Tech Summit Switzerland 2019 - DOCKER + AZURE DEVOPS + KUBERNETES = ♥
 
Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)Why Rust? by Edd Barrett (codeHarbour December 2019)
Why Rust? by Edd Barrett (codeHarbour December 2019)
 
Eta lang Beauty And The Beast
Eta lang Beauty And The Beast Eta lang Beauty And The Beast
Eta lang Beauty And The Beast
 
Raising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityRaising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code Quality
 
The New Three Musketeers–onecics4all-Isabel Arnold
The New Three Musketeers–onecics4all-Isabel ArnoldThe New Three Musketeers–onecics4all-Isabel Arnold
The New Three Musketeers–onecics4all-Isabel Arnold
 
Better Than BASH: Scripting Kotlin
Better Than BASH: Scripting KotlinBetter Than BASH: Scripting Kotlin
Better Than BASH: Scripting Kotlin
 
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbersDefcon 22 - Stitching numbers - generating rop payloads from in memory numbers
Defcon 22 - Stitching numbers - generating rop payloads from in memory numbers
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

Be pinched by a cRUSTacean to prevent programming errors !

  • 1. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 1/49 RUSTRUST Be pinched by a cBe pinched by a cRUSTRUSTacean to prevent programmingacean to prevent programming errors !errors !
  • 2. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 2/49 2 words about us2 words about us $ cat ~/.bash_profile NAME="René Ribaud" AGE=43 source ./1998.sh PROFESSION="Unices system and storage" "administrator , since 2003" HISTORY="Lots (too many) infrastructure" "implementation projects" "Discover Linux & FLOSS between" "1995 / 2000" "First step in the cloud around 2011" ", pre-sales solution architect" "2014 (Cloud, DevOps)" "I’m an Ops !" COMPANY="CGI 20th November 2017" JOB="Information system architect" "specialized around DevOps technologies"
  • 3. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 3/49 2 words about us2 words about us François BestFrançois Best Freelance Developer Embedded/Realtime C/C++ background Seduced by the Dark Side of the Web Current interests: Rust (of course) Security / Cryptography Decentralisation Personal data protection & de-GAFAMing Github: | Web: @franky47 @47ng francoisbest.com
  • 4. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 4/49 What is RUST ?What is RUST ? New systems programming language Multi paradigm language (imperative, functional, object oriented (not fully)) By Mozilla and the Community Dual license MIT and Apache v2.0 First stable release May 15th, 2015 Rust 2018 (v1.31), a major new edition released December 6th, 2018
  • 5. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 5/49 Goal ?Goal ? Provide an alternative to C/C++ and also higher-levelProvide an alternative to C/C++ and also higher-level languageslanguages
  • 6. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 6/49 Why is this Ops guy speaking about aWhy is this Ops guy speaking about a programming language ?programming language ?
  • 7. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 7/49 Immune to coder disease 1Immune to coder disease 1 My language is the best !My language is the best ! And my code is also the best !And my code is also the best ! This is part of my job to know languages and especially how to build projects usingThis is part of my job to know languages and especially how to build projects using themthem
  • 8. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 8/49 Immune to coder disease 2Immune to coder disease 2 I don't make mistakes, only bad coders are making onesI don't make mistakes, only bad coders are making ones Really, how do you explain all major projects security issues ?Really, how do you explain all major projects security issues ? I'm fed up about segfaults and null pointer exceptions !I'm fed up about segfaults and null pointer exceptions !
  • 9. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 9/49 Why is RUST exciting to me ?Why is RUST exciting to me ? And probably why should you look at it ?And probably why should you look at it ?
  • 10. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 10/49 PromisesPromises Focus on safety -> avoids errors and helps finding them ! Especially safe concurrency Fast, really fast !
  • 11. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 11/49 But alsoBut also Compiled language, few runtime dependencies Produces binaries, that could be static with musl Can interact easily with other languages via ABI and bindings (Python, C/C++, JS...) State of mind, hard at compile time, but safe at runtime Somewhere challenging !
  • 12. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 12/49 Ripgrep (rg)Ripgrep (rg) An application written in RustAn application written in Rust A grep enhanced Compatible with standard grep Search speed is really impressive Look also at fd, exa, lsd...
  • 13. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 13/49 And a cute mascot !And a cute mascot !
  • 14. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 14/49 What it looks likeWhat it looks like extern crate flate2; use flate2::read::GzDecoder; use std::fs::File; use std::io::Read; fn run() -> String { let path = "ascii.txt.gz"; let mut contents = String::new(); let gz = File::open(path).unwrap(); // open and decompress file let mut uncompress = GzDecoder::new(gz); uncompress.read_to_string(&mut contents).unwrap(); contents // return implicitly contents } fn main() { println!("Hello, world!"); let result = run(); // call run function println!("{}", result); // display compress file content }
  • 15. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 15/49 Language featuresLanguage features Static type system with local type inference Explicit mutability Zero-cost abstractions Runtime-independent concurrency safety Errors are values No null Static automatic memory management No garbage collection
  • 16. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 16/49 Safety is achieved by mainly 3 conceptsSafety is achieved by mainly 3 concepts
  • 17. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 17/49 MutabilityMutability struct Bike { speed: u32, distance: u32, brand: String, } fn main() { let mybike = Bike { speed: 25, distance: 1508, brand: "Liteville".to_string(), }; mybike.speed = 30; //Reassign !!! println!( "Bike {}: speed={} distance={}", mybike.brand, mybike.speed, mybike.distance ); }
  • 18. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 18/49 Mutability errorMutability error error[E0594]: cannot assign to field `mybike.speed` of immutable binding --> src/main.rs:14:5 | 8 | let mybike = Bike { | ------ help: make this binding mutable: `mut mybike` ... 14 | mybike.speed = 30; //Reassign !!! | ^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding error: aborting due to previous error For more information about this error, try `rustc --explain E0594`. error: Could not compile `immutability`.
  • 19. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 19/49 Ownership & BorrowingOwnership & Borrowing Every piece of data is uniquely owned Ownership can be passed When owned data reaches the end of a scope, it is destroyed
  • 20. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 20/49 OwnershipOwnership fn main() { let s1 = String::from("Hello, RUST ! 🦀"); let s2 = s1; println!("{}", s1); }
  • 21. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 21/49 Ownership errorOwnership error --> src/main.rs:3:9 | 3 | let s2 = s1; | = note: #[warn(unused_variables)] on by default error[E0382]: borrow of moved value: `s1` --> src/main.rs:4:20 | 3 | let s2 = s1; | -- value moved here 4 | println!("{}", s1); | ^^ value borrowed here after move | = note: move occurs because `s1` has type `std::string::String`, which does not implement the `Copy` trait error: aborting due to previous error For more information about this error, try `rustc --explain E0382`. error: Could not compile `owned2`.
  • 22. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 22/49 OwnershipOwnership fn main() { let s = String::from("Hello, RUST ! 🦀"); display(s); display(s); // Already owned ! } fn display(some_string: String) { println!("{}", some_string); }
  • 23. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 23/49 Ownership errorOwnership error error[E0382]: use of moved value: `s` --> src/main.rs:5:13 | 4 | display(s); | - value moved here 5 | display(s); // Already owned ! | ^ value used here after move | = note: move occurs because `s` has type `std::string::String`, which does not implement the `Copy` trait
  • 24. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 24/49 Ownership & BorrowingOwnership & Borrowing Access can be borrowed (mutable and immutable) You can borrow mutably once Or multiple times immutably Exclusive: mutable or immutable, never both
  • 25. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 25/49 BorrowingBorrowing fn main() { let s = String::from("Hello, RUST ! 🦀"); display(&s); display(&s); } fn display(some_string: &String) { println!("{}", some_string); } Hello, RUST ! 🦀 Hello, RUST ! 🦀
  • 26. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 26/49 Borrowing mutableBorrowing mutable fn main() { let s = String::from("Hello"); change(&s); println!("{}", s); } fn change(some_string: &String) { some_string.push_str(", RUST ! 🦀"); }
  • 27. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 27/49 Borrowing mutable errorBorrowing mutable error error[E0596]: cannot borrow immutable borrowed content `*some_string` as mutable --> src/main.rs:9:5 | 8 | fn change(some_string: &String) { | ------- use `&mut String` here to make mutable 9 | some_string.push_str(", RUST ! 🦀"); | ^^^^^^^^^^^ cannot borrow as mutable error: aborting due to previous error For more information about this error, try `rustc --explain E0596`. error: Could not compile `borrow_mut`.
  • 28. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 28/49 Borrowing mutable fixedBorrowing mutable fixed fn main() { let mut s = String::from("Hello"); change(&mut s); println!("{}", s); } fn change(some_string: &mut String) { some_string.push_str(", RUST ! 🦀"); } Hello, RUST ! 🦀
  • 29. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 29/49 References validity checksReferences validity checks #[derive(Debug)] struct Person<'a> { first_name: &'a str, last_name: &'a str, age: &'a i32, phone: Vec<&'a str>, } fn return_reference<'a>() -> Person<'a> { let age = 25; Person { first_name: "John", last_name: "Doe", age: &age, phone: vec!["123-123", "456-456"], } } fn main() { let person = return_reference(); println!("{:?}", person); }
  • 30. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 30/49 References validity checks errorReferences validity checks error error[E0597]: `age` does not live long enough --> src/main.rs:15:15 | 15 | age: &age, | ^^^ borrowed value does not live long enough ... 18 | } | - borrowed value only lives until here | note: borrowed value must be valid for the lifetime 'a as defined on the function body at 9:1... --> src/main.rs:9:1 | 9 | fn return_reference<'a>() -> Person<'a> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0597`.
  • 31. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 31/49 Concurrency without fearConcurrency without fear
  • 32. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 32/49 Concurrency without fearConcurrency without fear
  • 33. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 33/49 Concurrency without fear errorConcurrency without fear error Rust type system allows no data racesRust type system allows no data races error[E0596]: cannot borrow `words` as mutable, as it is a captured variable in a `Fn` closure --> src/main.rs:19:54 | 19 | .for_each(|arg| tally_words(arg.to_string(), &mut words).unwrap()); | ^^^^^^^^^^ cannot borrow as mutable | help: consider changing this to accept closures that implement `FnMut` --> src/main.rs:19:19 | 19 | .for_each(|arg| tally_words(arg.to_string(), &mut words).unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0596`.
  • 34. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 34/49 High level abstractionHigh level abstraction Generics and TraitsGenerics and Traits Define shared behavior Define behavior based on types Define behavior from various types with trait bounds
  • 35. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 35/49 Unsafe RustUnsafe Rust Allow to disengage some safety features Use at your own risk ! Crates using unsafe code can be audited with cargo- geiger
  • 36. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 36/49 A modern languageA modern language with builtin code quality standardswith builtin code quality standards Documentation embedded into code Unit tests Integration tests Great documentation (books and std lib)
  • 37. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 37/49 A modern languageA modern language with tools to be productivewith tools to be productive Environment setup and update rustup Package (crates) management cargo + plugin Code formatting rustfmt Compiler rustc Efficient error messages Potential solution Linter clippy Code completion racer Help transition to 2018 edition rustfix Editor integration (IntelliJ, Vs code, Vim, Emacs...)
  • 38. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 38/49 Opinionated for productivityOpinionated for productivity Avoiding bikesheddingAvoiding bikeshedding Crates have a defined filesystem structure Modules & exports based on file location (like Python) But with control over public / private exports (like ES6) Batteries included, but replaceable Procedural macros for DSLs (eg: JSON, CSS...) Custom compile-time extensions with build scripts Cargo extensions with cargo-foo binary crates
  • 39. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 39/49 Interesting cratesInteresting crates That extend the std libThat extend the std lib Date and time management chrono Parallel iteration rayon HTTP client reqwest Command line parsing clap, docopt, structopt Logging log Serialization serde Regular expressions regex ...
  • 40. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 40/49 Area of useArea of use Command line tools Web and network services Embedded device, IOT WebAssembly Games
  • 41. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 41/49 Who is using Rust ?Who is using Rust ? Mozilla, servo project RedHat, stratis project Dropbox Telenor Chef
  • 42. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 42/49 Who is using Rust ?Who is using Rust ? Ready at dawn Chucklefish that published Stardew Valley and Starbound, is using Rust in their new projects Wargroove and Witchbrook to get safe concurrency and portability
  • 43. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 43/49 Who is using Rust ?Who is using Rust ? Clevercloud, (Geoffroy Couprie) nom, parser Sozu, reverse proxy Snips ANSSI: RFC for secure application design in Rust
  • 44. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 44/49 Governance and communityGovernance and community Rust is pragmaticRust is pragmatic All features are driven by needs of real software The language is evolved with user feedback Consciously chooses familiar constructs Picks good ideas from others Doesn’t want to be the primary language at all cost
  • 45. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 45/49 Governance and communityGovernance and community Beloved language and communityBeloved language and community Voted "Most loved language" on Stackoverflow 2018, 2017, 2016 Only 1/100 of survey respondents have issues with the Rust community Newcomers from all directions https://insights.stackoverflow.com/survey/2018/#most-loved-dreaded-and-wantedhttps://insights.stackoverflow.com/survey/2018/#most-loved-dreaded-and-wanted
  • 46. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 46/49 Governance and communityGovernance and community growthgrowth https://8-p.info/visualizing-crates-io/https://8-p.info/visualizing-crates-io/ Crates.ioCrates.io
  • 47. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 47/49 Governance and communityGovernance and community Help from the communityHelp from the community Lots of books IRC and Discord channels User forum Youtube channel Meetups
  • 48. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 48/49 Governance and communityGovernance and community Beloved language and communityBeloved language and community Experience from Mozilla to drive open projects All major decisions, go to an open Request For Comments process Release every 6 weeks 3 channels: stable, beta and nightly Medium time to merged PR for changes: 6 days! More then 4/5 of contributions to the Rust language come from outside Mozilla The compiler has more then 2000 contributors
  • 49. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors ! localhost:8000/rust/?print-pdf#/ 49/49 THANK YOUTHANK YOU René Ribaud <rene.ribaud@cgi.com> François Best <contact@francoisbest.com>