Supernova: rustfmt

Chaya Danzinger
2 min readJan 10, 2019

--

I previously wrote about Supernova, and my experience contributing to a project in a language I had never used before. Although my PR is still WIP status (I need to find time to get a solid grasp on Date/Time stuff in Rust, specifically using the chrono crate), I picked up some smaller issues in the interim to stay involved.

My most recent PR’s involved working off of a previous PR which introduced code linting with clippy, and taking it one step further by introducing rustfmt to help ensure consistent coding style in our CI pipeline.

I followed this minimal example to set up rustfmt in Travis CI after reading a little bit about how it works here. I was confused about the difference between nightly, stable, and beta until I did some reading and learned they refer to different release channels. This basically means you can write your code using a reliable version of Rust (stable), but those who want to try out experimental new features can use nightly or beta. Nightly is a release that happens every night, while beta is typically only used for testing stable code against an accumulation of nightly releases in a CI system. Appendix G of the Rust docs outlines the process and why it’s useful very clearly. Understanding how that all works, as well as going through the Travis CI Rust documentation, gave me the ability to read the .travis.yml file I had to modify and not feel totally lost, as well as make the requested changes.

As a student, I have found that while we spend a considerable amount of time learning specific programming languages, we never really touch upon these seemingly less significant processes (like CI pipelines and the tools that are often used). My experiences contributing to Open Source is slowly teaching me how these processes are actually extremely useful and highly used/valued in the work force.

One of the reasons I love working in Open Source, especially as a student, is that it gives you so much exposure to tools, processes, and methods used by actual companies in real projects. Idk about you, but I can’t think of a better way to prepare myself for the ‘real world’ than that.

--

--