4.3 KiB
4.3 KiB
Rust, Rocket and Diesel
Rust
What is Rust?
#+LaTeX:∈cludegraphics[width = 0.65\textwidth]{img/Bruine_roest_op_tarwe_(Puccinia_recondita_f.sp._tritici_on_Triticum_aestivum).jpg}
Rust, the language
- About 10 years old (2010)
- Memory safe without gcing, optional ref counting
- Ownership, lifetimes, traits
- Variables are immutable by default and can be shadowed
- Performance of idiomatic Rust is comparable to the performance of idiomatic cpp
Where to get infos
Docs…
- The rust book (
$ rustup docs --book
), Rust by example - The Rust Standard Library
- cheats.rs
- cargo.io/lib.rs
How to install
Install Rust
$ curl --proto '=https' --tlsv1.2 -sSf \
https://sh.rustup.rs | sh
Install nightly Rust (needed for Rocket)
$ rustup toolchain install nightly
Install rustfmt (code formatter)
$ rustup component add rustfmt
Install clippy (linter and static code analysis)
$ rustup component add clippy
Rocket
What is Rocket?
Rocket is a web framework for Rust that makes it simple to write fast, secure web applications without sacrificing flexibility, usability, or type safety.
Features
Col left
- Type Safe
- Extensible
- Templating
- Cookies
Col right
- Streams
- Testing (Unit tests)
- Typed URIs
Where to get infos?
Chat
- Matrix: #rocket:mozilla.org
- IRC on Freenode: #rocket
Diesel
What is an ORM?
What is diesel capable of?
Lets code something
Conclusion
What did we do?
What did you hopefully learn!
Two small projects
The End
#+LaTeX:∈cludegraphics[width = 0.3\textwidth]{img/goodbye.jpg}
\Huge Thanks for your attention!!1!
This is the end..