Danilo Campos and I co-wrote this post!
While you’ve probably heard plenty about Rust—its benefits for correctness and memory safety, perhaps, or its adorable unofficial mascot, Ferris the crab—what you may not know is that the project has set a high bar for its onboarding developer experience. There are lessons any project can take, and we wanted to walk through them.
Automate the knucklehead stuff
Computers are our friends! Whenever possible, it’s great to use that to make it easier to get moving with a new technology. In Rust’s case, the getting started page detects the visitor’s operating system, then uses that information to provide relevant setup instructions.
It looks like you're running macos, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See "Other Installation Methods" if vou are on Windows." Followed by the curl to install rustup"/>
From there, an installation script sets up the Rust tools with just one line of input. Instead of a long sequence of instructions, a tidy piece of automation handles setup.
Finally, there’s even a one-click Rust sandbox where you can skip setup altogether and dive into a pre-built environment to start playing around with the language.
Fast time-to-hello-world
Rust knows many of its practitioners have existing experience with tools they love. Integrations between Rust and popular IDEs get prominent notice, so you can quickly get moving in a familiar environment.
Whether you prefer working with code from the command line, or using rich graphical editors, there's a Rust integration available for your editor of choice. Or you can build your own using rust-analyzer.VS CODE. SUBLIME TEXT. ATOM. INTELLI IDEA. ECLIPSE. VIM. EMACS. GEANY."/>
Once you’re set up, Rust walks you through the mechanics of setting up your first project, explaining context along the way. With just a few commands, you’ve got running code that prints “hello world!”
Streamlining the process to get to working code, even when it’s just a simple program to print a friendly message, is essential to developer success. It makes it clear that the whole toolchain is working correctly, setting the table for productive exploration of the new technology.
Connection to the larger ecosystem
Rust has a lot of power, but like any ecosystem, it has specific details you’ll need to understand to make the most of it.
While Rust has abundant docs, the Getting Started page elevates essentials like package and dependency management front and center, since they’re a topic every developer will need to understand to be productive. Thus introduced, Rust then walks you through how to use these dependencies in your own code. This unlocks the larger universe of existing Rust code, letting you build what you want without having to reinvent the wheel.
So how’d they do that?
We wanted to know! So we asked, and Carol Nichols, author of The Rust Programming Language, answered our questions.
Rust's developer experience is optimized for rapidly getting developers up and running — how did the culture develop? How do you prioritize, emphasize, incentivize, or invest in it?
Many people come to Rust with experience in other languages and ecosystems, and they’ve used that experience to improve upon the status quo. For example, many people wanted a systems language like C++ but with the package management and build tools from Ruby that make sharing libraries easier. There have been cases when developers start using Rust and find friction or confusion. Caring folks in the community try their best to not get defensive, but to take that as an opportunity to improve sharp edges that we’ve gotten used to. Another is Esteban Kuber, who actively solicits error messages that the compiler gives that people have found confusing then improves them.
What advice do you have for others looking to improve their developer experience?
Do some usability testing! Create a task like following a tutorial, give it to someone in your target audience who you’d like to improve the developer experience for, and watch them (in person or remotely) try to accomplish this task. Write down every spot they have trouble, and only help if they’re truly stuck. Then turn those problems into improvements to tooling, documentation, or features and repeat!
Where should people who want to get involved in Rust's developer experience go?
It depends on the part of the experience you’re particularly interested in! Here are some I can think of — The Dev Tools team, for work on:
- Cargo
- IDE and editor support
- Clippy (Rust’s linter)
- Rustfmt (code formatting)
- Rustdoc (the tool that generates Rust documentation)
- Docs.rs (crate documentation hosting)
- Rustup (Rust version manager)
- Bindgen (tools for generating FFI bindings)
- Rustfix (a tool that can automatically fix some warnings)
The Compiler Team, especially the Diagnostics Working Group that improves compiler error messages. The Libs Team, for work on the contents of the standard library documentation
But you don’t have to take our word for it!
Hit the Rust Getting Started page and try it for yourself. It’s a tidy example of how to set up developers for success. Maybe you can use these lessons for your own open source project!