Getting Started w/ Rust on Pop

At System76, we write most of our Pop projects in Rust. It enables the rapid development of reliable, efficient software, even if you are a small team working on a very complex project. If you need to develop a project that’s guaranteed to succeed, with minimal hurdles, and avoiding entire classes of security vulnerabilities, with the performance of C, Rust is the tool for the job. Rust is bundled with the Cargo package manager; and the and services; to enable rapid and massive distribution of modular code, and readily-available documentation for every Rust crate on the Internet.

Where to Install

Rust is offered in the Ubuntu repositories, and we may backport newer versions of Rust from time to time, but software developers that are writing software in Rust should always look to the official Rustup Toolchain Manager for their toolchain needs. The packages in the Pop and Ubuntu repos are for those that would like to have their software packaged for Pop, and are used by the build systems to build Debian packages.

Configuring a Rust Development Environment

The IDE that you choose will not matter too much. All of the actively-developed IDEs for Rust are based around the Rustup and Rust Language Server — both official projects of Rust. To set up your environment, you simply need to run the following after installing Rustup:

rustup default stable
rustup component add rustfmt-preview
Then it’s just a matter of installing any editor or IDE you want, and getting the Rust extension for that editor. See the Tools section of the Rust website for a list of supported editors and IDEs.

Contributing to Pop and the Rust Community

The Rust community is still new (Rust officially released with the first stable version in 2015), so there’s a lot of code that you can contribute if you want to, which might very well end up in a System76 project at some point! We host a handful of crates of our own, but any contributions that software developers make to the Rust community will both indirectly and directly benefit the development of Pop over time. You will also bring benefits to everyone across the globe that is also building software in Rust.

Getting Help With Rust

For general Rust queries, the official Rust users forum is a good place to start. You can also ask here for more advanced advice from myself and others experience with writing Rust software from, and targeting, Pop!_OS.

I am a System76 software engineer, maintainer of Pop!_OS, and contributor to Redox OS. My preferred programming language is Rust, with four years of e...