Learning Rust: Part 1

Learning Rust: Part 1

So, this is my first blog and first (other than Hello, world!) venture into the Rust world. I figured I would share my progress as a way to write down my thoughts and feelings and to give some history for myself when I look back.

Hi future me. Hopefully you learned something.

About me

Hi, I’m Dom. I am a software engineer at BT, currently working in the mobile apps space. I use C# with Xamarin.Forms daily, though I have also built web apps with JavaScript and dabbled with other languages too. Programming is a hobby as much as a job, so I like to keep up to date with where the software industry is going.

How am I learning?

I am following Tim McNamara's “How to Learn Rust" course. It is a free course, written by the author of "Rust in Action", which I will no doubt be buying shortly.

I have decided to make use of my code-server environment so I can code from anywhere without having to setup Rust on different machines, convenient for bite-size learning as the course advocates for. There will be more about this below for anyone else who may want to do a similar thing.

Why Rust?

At this point, the Rust hype train has far departed the station. It is being integrated into the Linux kernel, Android, Windows kernel and more. It is known for being memory safe, yet in the same performance league as C/C++. Now, I don't know either of those languages either, but at this point, Rust feels a safe bet to venture into the performant, system language world.

Aims and Goals

My main aim to is to learn a new language that I think will gain even more adoption in the future. I would love to work in this field, so that journey starts now.

I think my non-first guided Rust project will be programming the Waveshare Pico clock. I currently maintain a version of this in MicroPython, though the two goals I have (learning Rust and developing this project) don’t really go hand in hand. So how about combining them? Is it too ambitious, probably. But that is where I want this to go.

Environment

I mentioned above I am using code-server to do my Rust learning. I self host this via Docker, meaning I can code from my browser, regardless of machine and the Rust tool chain is always there and ready. No setup on individual machines and syncing extensions etc etc. Even better, it is just VS Code, so all the extensions for Rust work perfectly!

I’m not going to do a full tutorial on here as other people have done it better. However, here is a link to the Docker mod that installs the Rust tool chain for you when you install and boot the code-server Docker container (via the linuxserver.io container). A huge thanks to the contributors who make this so easy to do!

Conclusion

Well, this is it, short and sweet for the first blog. The future ones will be around the course and how I am finding Rust. It will probably be weekly, though I don't really have a schedule. And hey, if I enjoy it, I might write about other things too. I spend enough time reading content, I should probably start contributing back.

Thanks for reading,

Dom