Presentation: Rust: Systems Programming for Everyone

Location:

Duration

Duration: 
11:50am - 12:40pm

Day of week:

Key Takeaways

  • Understand how Rust makes systems programming accessible for everyone. 
  • Learn more about the community and ecosystem supporting Rust, including tooling and crates. 
  • Hear a core engineering working on developing Rust explain core concepts like ownership, borrowing, and lifetimes.

Abstract

Rust is a new programming language that provides memory safety and data-race freedom while offering efficiency and low-level control comparable to that of C and C++. Rust allows for safe systems programming, including concurrent threads with shared data.

I will describe the core concepts of the Rust language (ownership, borrowing, and lifetimes), as well as the tools beyond the compiler for open-source software component distribution (cargo, crates.io).

These pieces, along with the continued work of Rust's volunteer community, have led so-called "script programmers" to discover systems programming in a hands-on fashion, expanding both their own skill set, and also the Rust ecosystem as a whole.

Interview

Question: 
QCon: Can you tell a bit more about your role today and perhaps why this type of talk is important to you?
Answer: 
Felix: I am a Research Engineer. So at Mozilla that basically means there is a small team dedicated to trying to investigate the future of the internet, and the infrastructure underlying it. So while the vast majority of the engineers at Mozilla are dedicated to the actual product of Firefox, the research group is more interested in what’s next. Things like what’s after Firefox or what is next for the Internet as a whole because our mission is not just about making a web browser. It is about pushing the world forward by using the Internet and trying to ensure the internet is an open resource for everyone. So my part in that research group is focused on the Rust infrastructure. We are pushing Rust as being a piece of what could be foundational infrastructure for making highly reliable services and high performance services.
Question: 
QCon: What is the attendee going to hear in your talk?
Answer: 
Felix: The first thing I want to do is to demonstrate two different libraries for parallelism, the community providing different APIs, different protocols, different paradigms for doing parallel programming. I want to point out that both are safe in the sense that they prevent data races, they prevent memory access violations but they have different constraints in how they are used. So there is a very real choice for the end programmer about which kind of paradigm they want to opt into and I want to both show how clean the code looks, like how relatively simple it is to express interesting parallel patterns and then also talk about how we have provided the library developer with the means to come up with these new and different paradigms that go beyond what the standard library itself can do.
Question: 
QCon: Tell us a bit about Cargo, crates, and package management.
Answer: 
Felix: The standard package manager that we are using is called Cargo and there is a corresponding website called crates.io where Cargo and crates.io are very tightly linked. Crate is the Rust terminology for a package or library that you are putting up there, so if you have a crate that you want to distribute and you register it on crates.io then Cargo will know about that crate and anybody can get it from there. There are over 4,000 crates and some 22 million downloads at this time. After adding a dependency on a package in a configuration file, they just hit Build and Cargo does the rest in terms of downloading that crate and also all of its dependencies, building them for the respective target and then linking them in. And, that’s it. Cargo supports updating the crates when new versions are available, and setting some rules on what versions of a crate it should download. Maybe someone does not want to use the latest version but some intermediary one.
Question: 
QCon: Can you provide an use case where Rust is being used in production?
Answer: 
Felix: Off the top of head, the main example is Skylight. They made this product for instrumenting Ruby code and providing feedback about its performance. They did it first in Ruby and then they distributed it and found that there was too much overhead due to Ruby’s memory management and other issues. They decided at that time it was a big risk to try to do that component in C or C++, so they did it in Rust and they got it going and have successfully deployed it.
Question: 
QCon: What is the main thing you want people to leave with from your talk?
Answer: 
Felix: I want them to walk away saying “Wow, I really need to learn more about this technology because it’s very likely to matter in my future as a developer.” That would be the ideal.

Tracks

Covering innovative topics

Monday, 7 March

Tuesday, 8 March

Wednesday, 9 March

Conference for Professional Software Developers