A couple of weeks ago my friend showed me
libm, a port of the math library from musl (a
re-implementation of the C standard library) to "nostd" Rust which is just Rust
with no external dependencies (even the standard library). The coolest part: it
wasn't written yet! The maintainer, @japaric had set up a bunch of "help wanted"
and "good first issue" issues, and the tasks were fairly compartmentalized
because each one involved porting a single math function like
As someone who's always been interested in open source software, but never
actually contributed, it looked like a great opportunity and I got right to
One of the hurdles to contributing to a project is the difficulty of setting up
your environment, but a combination of japaric's beginner friendly
and cargo being amazing made it a breeze. I uncommented one line of code and
unit tests for the function I was working on magically appeared thanks to some
After fumbling around with my basic knowledge of Rust I finally got
working and made a PR. Even though it had merge conflicts, I didn't run
rustfmt, and I didn't squash my commits, no one made fun of my incompetence.
Japaric left helpful comments, and a few fixes later I had merged my code! High
off that success I implemented more functions over the next few evenings, and
there were enough other people contributing that within the week we had finished
all but a few difficult functions. I've been checking in on it since, and it
looks like it may get used in the
I always had this idea that open source contributors were superhuman programmers and it made me apprehensive about trying to do it myself, but my experience with libm has showed me that I had nothing to be afraid of. The largest factor that made the process so welcoming was the kindness of the rest of the contributors. For a self concious newbie like myself, I could have been scared away very easily by someone calling out my obvious inexperience while commenting on PRs. I hate that some of the most famous open source discourse out there is Torvalds yelling at people on the LKML. I realize how silly it sounds, but I was terrified of being made fun of for my numerous mistakes.
I've heard great things about the Rust community, now I can say from firsthand experience that they were right. I joined the Rust Discord server and it's been refreshing to watch a bunch of strangers on the internet treat each other with respect. Programming is a collaborative process, even when working by yourself you consult documentation and Stack Overflow so having a community that cares about each other isn't just heartwarming, it's productive. More people having their questions answered nicely means more people getting better at the language means more people contributing to open source. The Rust community seems to understand this well, the weekly newsletter has a list of open source projects that need help and are good for beginners.
I can't wait to jump back in and find another Rust project that wants help. In the meantime, since I can use complex math in nostd projects now thanks to libm, maybe I'll go port cubefield to Rust.