Wikimedia Hackathon 2018/Intro to Rust
I (Tobias1984 (talk)) have been using Rust for 1/2 a year now and would like to show other new Rustanceans how to get up and running.
The introduction will feature:
- Install the most recent version of Rust using Rustup
- Install useful tools using Cargo (ripgrep, exa, ...)
- Starting libraries and programs using Cargo
- How to manage dependencies from Crates.io
- If time permits we will start a simple command line tool (with clap). That means you might learn a little bit about the core Rust concepts.
How to prepare
edit- Bring a laptop with a text editor and your choice of warm beverage.
What do you have to know
edit- Where the room is
- What type of warm beverage you like
Time & Location
edit- Sala de projectes (QC0011) 9:00 - 10:00
Interested?
editSign below if you are interested:
Steps done in the group
edit- Go to https://rustup.rs/ and execute the shell script
- See if "cargo" works in the terminal
- We installed ripgrep "cargo install ripgrep"
- We installed exa: "cargo install exa"
- We looked at crates.io for other packages
- We installed wkdr "cargo install wkdr"
- Talked about Rayon: https://www.youtube.com/watch?v=gof_OEv71Aw
- We started a binary project "cargo init"
- Looked at the Cargo.toml
- Added clap to the dependencies (https://clap.rs/ – the current version is 2.31.2)
- We run "cargo update" to get the dependencies and write the cargo.lock file
- Talked about lifetimes, ownership, borrowing, zero-cost-abstractions.
- Talked about Reference counted variable (Rc, mutex)
Attendance
editCounted: 15