I accidentally a car

By Paul Sajna

Question: How long does it take to turn lolcatz into production automobiles? Answer: 5 years and 2 days.

Obviously that's a ridiculous question with an overly-specific answer. As the description of this blog post ("A surreal story of Open Source maintainership"), indicates, the whole story you're about to read feels equally ridiculous to me. But that's part of what makes it so fun. Those who know me personally probably know I get a bit lost trying to explain things on the spot, and prefer to contemplate my words longer than realtime speech allows, so it's time to get this story down somewhere people can see it (also a few years late).

Alright, so lolcatz and cars, what? Stay with me here. During Winter break of 2018 (while I was in college), I posted a PR on GitHub to a project called atsamd-rs. A little while earlier, I had received (free of charge, thanks Scott Shawcroft!) some Adafruit dev boards, in particular, a Metro M4, Circuit Playground Express, and a Feather M0 Express. A lot of people use their early 20s and college years as a time to experiment. For me, in 2018, that meant trying out hot new programming languages, Go and Rust. I fell in love with Rust, made some contributions to Redox OS, and continued exploring, particularly in the realm of Embedded Rust. My programming journey has been characterized by a need to unravel abstractions and see what's beneath them. I had been programming for roughly 10 years in my spare time by 2018, so I was pretty deep below the surface-level abstractions, close to the metal, at the level of microcontrollers. Anyway, I had some adafruit dev boards, and I wanted to try embedded rust. For the Circuit Playground Express and the Feather M0, the underlying microcontroller a Microchip/Atmel SAM D21, was supported by the atsamd-rs project already, so I contributed some board-specific support files and examples for the CPX, and reviewed/tested Ben Bergman's changes to add the Feather M0. That was a good way to get my feet wet, but the Metro M4 posed a more interesting challenge. It had a newer, more powerful variant of the Microchip/Atmel SAM D family, the SAM D51. The SAM D51 had no HAL (hardware abstraction layer) support in atsamd-rs, meaning none of the microcontroller functionality had a usable interface for doing much of anything in Rust. That takes us back to the PR at the start of this long-winded paragraph. By late December 2018, I had gotten the SAM D51 and Metro M4 roughly working enough to blink an LED, and posted the PR. There was more to do to get other basics working, but by February 25 2019, I had enough working to draw the following image to an SSD1306 embedded oled display, and jokingly added a comment to the PR containing the image.

I can haz cheezburger cat with text "I can haz merge?"

Ok so that's a lolcat, maybe, or is it called happycat? Eh, close enough. But what does any of this rant have to do with cars? I have an answer, I promise, it's coming, but hopefully the way I'm telling this story expresses how disconnected I personally feel the two things are. Initially, atsamd-rs was maintained by a gentleman named Wez Furlong, but shortly after I started contributing, he moved on to his WezTerm project, and I was left to maintain atsamd-rs, along with some other contributors and maintainers. I continued adding more features, and reviewed a lot of PRs from other contributors, some of which went way over my head. On March 29th 2021, roughly 2 years after I started contributing, atsamd-rs received it's first commits and PR from Glaeqen and vcchtjader We didn't realize at this time, but the vcc in vcchtjader stands for Volvo Cars Corporation. Check the merge commit message if you don't believe me. By this time I was getting distracted by other cool rust projects, and starting my career, so I mostly left reviews to others, and eventually passed maintainership to Bradley Harden, like Wez had passed it to me. So I can't take much of the credit and I don't mean to. The blog title "I accidentally a car", isn't an attempt to take credit, it's more of a joke in the style of "I accidentally a word", like, "where did that come from?". By September of 2022, Volvo posted a blog to Medium announcing it's usage of Rust in cars, and how it was using "an ATMEL/Microchip ATSAME chip, and there is an Open Source project for it." Props to mvniekerk for adding the ATSAME53 by the way, without which I might not have this story to tell. The SAM E53 is similar to the SAM D51 in a lot of aspects, and I like to think my addition of SAM D51 set the stage, but the SAM E53 was the real star of the automotive world. It turns out, very similar chips to those used in Adafruit dev boards played with by college students, are used in the safety critical automotive industry. Who'da thunk?

So by September 2022, we were well aware of Volvo's involvement, and atsamd-rs was increasingly being used for professional development, not just in cars either. A little later we learned Volvo was working with Polestar on the Polestar 3, which finally takes us back to the initial question's answer. The Polestar 3 was announced production ready on February 27th 2024. 5 years and 2 days after I had posted the lolcatz on February 25 2019. Thanks to the atsamd-rs contributors and maintainers, and especially Volvo employees for putting this wild scenario in my lap. Thanks for reading.

Polestar 3