RustConf 2018 Portland OR
RustConf has been the first ever conference for a programming language that I was eager to attend. Since, it’s a new-ish language, the conference was not as big as, say, PyCon or KubeCon would be. This made it easy to talk to people you generally only know via Twitter. Also, the duration of conference was one day (two if you include the training day). During this conference I met three kinds of rustaceans —
- Core team.
- Using Rust at work.
- Trying to push my boss to use Rust at work.
Out of the three categories, most folks I met were in #3, including myself. I met a bunch of enthusiasts who just showed up and I like that.
I have never been a part of community that I feel was working for this level of inclusivity. The community and the language, both support the philosophy of “Hack without fear”. The level of commitment from core team and the community organizers resulted in a very diverse conference, compared to other conferences I have been to. I hope this will continue to get better and the community will be supportive.
I am a big proponent of good training days in conferences. These are some of the best days for learning via hands-on.
traits and threads by Aaron Turon
Aaron is a mindful tutor. This workshop was beginner-friendly. Even though the description says that “tutorial assumes basic understanding of ownership and borrowing”, Aaron still gave a refresher.
To begin, If you do not know about threads I recommend that you start with threads on Wikipedia and read more about threads in Rust book. As you will read through that page, you will note that Rust wants to keep the runtime really small (❤️). Rust’s thread model is not green (used to be, but not anymore). That is, it has one OS thread mapped to one language thread.
Uses of threads is mostly to facilitate parallelism in the program. In the workshop, I learnt in hands-on style that Rust’s parallelism supports multiple paradigms, like Message passing and Mutable shared memory. Even though these methods have issues in general, like data races, Rust’s borrow-checking and ownership makes sure that the compiler helps you eliminate potential data races early on.
Traits are Rust’s
interfaces in many ways although not exactly. Most of the idiomatic Rust revolves around defining and using types. Usually, the types need to have some functions associated with them to be more useful. Traits allow you to define certain methods in them and you can implement these Traits for any type of your choice.
See all the tutorials for yourself if you want some hands-on with Traits and Threads.
futures and async programming by Michael Gattozzi
- Michael Gattozzi on Twitter
- Exercise code
- Tokio: runtime for writing reliable, asynchronous, and slim applications with the Rust
- Futures-rs: Zero-cost asynchronous programming in Rust
With this workshop, Michael took me to a place in Rustland, where I was afraid to go on my own. Up until I saw this workshop listed on RustConf’s website, I was not sure whether I want to even try looking at Async stuff in Rust, given how little I know about Rust at the moment. Did I mention that Michael was very funny which is a good strategy to relax everyone.
The workshop, for majority, dug deep into the details and components of Async in Rust which is helpful if you want to understand what’s going on under the hood and at the same time how much work it requires to do manually. This is directly opposite to when the construct and semantics are provided by the language itself, which is where Rust is going, IIRC.
I am listing some of the resources I found during the talks. I am not going to write about the talks themselves as they will be online and you must watch them. 😊
- criterion.rs: Statistics-driven micro-benchmarking library. Via “Benchmarking and Optimization of Rust Libraries By Paul Mason”
- The core ideas of Rust — Ownership and Borrowing — can be applied to hardware as well. Via “Getting Something for Nothing By James Munns”
- raft-rs: Raft distributed consensus algorithm implemented in Rust. Via “Using Raft in Rust By Siddon Tang”
- Project Mentat: A relational (not key-value, not document-oriented) store that makes it easy to describe, grow, and reuse your domain schema. Via “Project Mentat: a store for evolving data in Rust By Emily Toop”
- Just the talk “Embedding Rust in C/C++ By Katharina”. Just watch this talk. Just do it.
- c2rust: a tool to translate C to semantically equivalent Rust. Via “C2Rust: Migrating Legacy Code to Rust By Per Larsen”