Browse by type

One of the things developers use every day is a shell. It comes in many flavors like bash, fish or zsh. Depending on your background, writing your own shell from scratch might either sound intimidating or pointless. We like to believe that it can be a fun way to gain more hands-on Rust experience. If you want to play with concepts like I/O, error handling, and syscalls we invite you to participate in this workshop. Who knows, it could also be an opportunity to start your first mid-size Rust project?
[!NOTE] Shells are very complex and we will only implement a basic subset of their functionality. Take this workshop as an excuse to learn Rust rather than a guide for how to write the perfect shell.
This workshop is intended for intermediate Rust programmers who already understand basic Rust concepts and have some programming experience. We’ll explain the rest as we go along. When we were learning Rust, we always wanted to see a mid-size system being built to get an understanding of how the concepts are put into practice. We think this could be a learning boost for people who are in the same situation as we were.
Use the slides to go through the exercises.
Use src/main.rs to start writing your code.
If you get stuck, check out the examples folder, which contains working source code for each block.
We recommend to try it yourself first and only refer to the example code in case you run into issues.
You can always check your implementation by running cargo test.
cd)Here are the individual blocks of work that we will cover:
We are curious to see what you have built. If you want to share your shell with us, please send us a link to your repository. We will add it to the list below.
We'd be happy to hear your answers to the following questions:
If you enjoyed this workshop, please share it with your friends and colleagues. It would greatly help us if you could tweet/toot about it or share it on Reddit or LinkedIn. Thanks!
You might also want to subscribe to our newsletter for future workshops and other Rust content.
If you are looking for professional Rust training, please get in touch with us at corrode.dev.
$ claude mcp add write-yourself-a-shell \
-- python -m otcore.mcp_server <graph>