02/21/2024

My Journey into the Rust-o-Verse - Part 1

ETAS News My Journey into the Rust-o-Verse

Today I want to talk about something a little more personal than my usual LinkedIn posts and introduce a 3-part series detailing my ongoing journey and exploration to the center of the Rust-o-Verse. I have had this itch to get back into a more hands-on developer role for a while now; being a passionate technologist I have noticed the ever-increasing trend of more and more software being written from scratch or converted to Rust. So with all the ambitions and goals that come with a new year I decided “How hard can it be” and that I would pick an Open Source Software Defined Vehicle (SDV) project to eventually contribute towards and earn that coveted “Eclipse Committer“ swag at the upcoming EclipseCon event!

For those unaware of the prominence of OSS automotive projects written in Rust already I’d encourage you to take a look at some of the projects found in Eclipse SDV & COVESA that are using this fascinating “new” language; here’s a few examples:

So as you can see my intrinsic motivation to learn to program in Rust is clear from the numerous SDV projects that I can choose to work on today, and I’m confident that more will come in the future. In my day job as a FOSSbassador I am exhilarated to see how compatible each one of these projects could be with one another and the advantages they gain by using Rust, as to me that is a critical path to eventually building a thriving and healthy community built in Rust.

With this in mind I have decided to focus on the Fleet management Blueprint as this project is attempting to build together various efforts from multiple Initiatives (COVESA, Eclipse, AUTOSAR). I also really like that we start to see it organically growing into an open-source playground in its own right; with contributions coming from other companies that help to further diversify its community.

Source: Geotab (Curve Project) & ZetaScale (Zenoh project)

Another motivation from a technologist perspective is I’m particularly curious to see what is involved in, say <replacing MQTT with Zenoh> or <implementing a Fleet Management Data down sampling algo with Curve logging> and seeing what I might learn about Rust along the way.

For anyone curious to learn more about the background of this blueprint my colleague Kai gave a great Tech session at eclipseCon explaining the origins for the project and gave some examples of the key challenges it helps to solve.

 


Now back to the real story which has been a ”rusty” experience of myself finding my way back around the usual developer tools and environment, but this time with a twist. The once familiar complex cmake or python’s magic virtual environment now replaced with something new that on many occasions reminds me a little of both my past experiences as an embedded MISRA C developer and my very brief journey into the “higher level” world of coding in languages like python or javascript.

It’s almost time to welcome Cargo & crates.io to the stage... but first we need to install rust and other dependencies into our Linux env and here started my not so expected adventure.

Much to my surprise after running through the great startup documentation in the Online Rust book I hit my first speed bump in my very naive usage of my newfound best friend the cargo CMD. So scratching my head and deciding that a freshly brewed espresso and mental break might be the best fix to my current dilemma:

“Why did cargo build keep failing?”

Now this was the start of my half-day attempt of trying numerous different things and eventually exhausting my reddit and stack overflow temporary buffers. Now little did I know that running this Rust project on ubuntu OS required a few secret tricks to get the project I had chosen to build and run....

Source: https://programmerhumor.io/programming-memes/learning-rust-got-me-feeling-like/

Hopefully you’ve enjoyed this blog so far and I hope you will continue the journey with me to discover how I overcame the “Hello World” roadblocks and what I’ve learnt since diving into the project. I’m also looking forward to exploring further with you why I think this little rustacean named Ferris is SO promising for the automotive industry and a core piece of the SDV & my daily life to come!

Thanks for reading Part 1!

Thomas Spreckley

Job position:
Technology Strategist

Function within the FOSS Team:
Community Management, Pushing for new open standards

"Catch me at the upcoming BCW event or in the one of the Open-source community calls – Ciao for now!"

Also available in our Newsroom