Skip to Main Content

Learning Rust #8: What's next?

Last December I finally started learning Rust and in January I built and published my first app with Rust: 235. Learning Rust is my monthly blog series that is defnitely not a tutorial but rather a place for me to keep track of my learning and write about things I've learned along the way.

Learning Rust series

It's been a while since I've written any Rust code. As the NHL season ended, I did a few small adjustments to 235 and I have very small content update to be done as the next season arrives (welcoming Seattle Kraken to the league!). That means, I've focused on other things during the summer – mainly surviving in the pandemic.

As the evenings have turned darker and more rainy, I've started to think more about what I'd like to build next to take my learning journey with Rust to a deeper level.

235 was a rather simple project: it fetches data from a single API endpoint and prints it on the screen. And I loved it for that. But it meant I didn't really have a chance to really explore the more advanced functionality with Rust and I definitely didn't want to introduce any new features just for the sake of adding them to learn.

In mid-June, I did a talk in Rust Denver meetup and we chatted briefly with Brooks about what my plans were next. Back then, I had an idea of building my own static site generator as I really like them and I had some ideas I wanted to explore in building a very custom tool for my own website.

However, I think I'll shelf that idea for a while. My website is due to a full rewrite in the near future and I'm focusing on making sure I get everything out from Eleventy as I plan it. One day I'll probably build one though.

Personal grocery management system

Today I was watching some videos on Youtube about urban planning and through random browsing, ended up seeing a video by Not Only Bikes on grocery shopping in Amsterdam. In the video, he showed a handheld scanner that's used while shopping to expedite the process.

That brought back some memories from my early adulthood as I was moving to live on my own for the first time. Back then (late 2000s), I was thinking about buying a barcode scanner and building a software to track the food I bought and ate. I ended up never building it but the idea of using automation to keep track of my purchases has stuck with me and this video sparked the idea again.

There's a bunch of things that interest me which would make it a great next learning project:

  • Building a web backend with Rust
  • Interacting with databases with Rust
  • Interacting with the barcode scanner in Javascript web app

Since I mostly work on the web envinronment, I want to explore the web backend ecosystem of Rust (is Rocket the way to go or what's the favorite web framework I should look into?) and since there was no data management in 235, working with databases is something I want to get comfortable with in Rust. I'm already comfortable with SQL databases like Postgres and the support looks solid so I think it'll be a great idea.

For the barcode scanner part, I found QuaggaJS which on my first experiments seemed to be quite ok solution for scanning items without having to leave the web app. If you're interested in seeing how that works, I will be writing a blog post about it outside this Learning Rust series so I recommend subscribing to my RSS feed so you don't miss any new blog posts.

The idea in a nutshell is this: when I come home from a shopping trip, I'd scan the products' barcodes as I put them into the fridge/pantry and the app would keep track of when I've bought what and eventually give me insights into my eating habits.