Using Rust on OpenBSD
Recently, I started using a new language on the block: go. However, I found myself quickly reading about other new languages that have showed up recently within the last few years.
One such language was rust.
I quickly realized that rust is quite easy to pick up, as it seemed to read very much like C, which I had not touched in years. In fact, I enjoyed writing rust even more than go!
Go was simpler to hammer out quick programs, as go code seemed to almost flow like shell. Yet something about how rust requires properly written code, is extremely appealing.
Those who know me, know that I would rather re-write the same code a dozen times, in order to make code smarter, faster, or cleaner. Rust requires code to be written in an orderly fashion, but takes your hand and leads you along to help.
Rust has a book available that will walk you through how to use each part of the rust language. I myself have only gotten through a few chapters so far, and have already been able to whip up functions somewhat easily.
However, OpenBSD 6.4 does not have the most current version of rust available in binary form. This was problematic as the rust book required the rust 1.31.0, the "2018" version. Without version 1.31.0, I realized that the code from the book would not compile without errors.
My solution was to simply switch to OpenBSD current, which happened to include 1.33.0. However, I did find that there is a fancy little script available for use, build-rust, that is able to compile the current versions of rust, using the rust available as a binary package in OpenBSD 6.4.
I wished the code I was working on would be complete by the time this article was complete, but I still have some work to do. So stay tuned. It's nothing crazy, but I would like to understand rust and polish the code up bit more before publishing the code on here.
Has been tested on OpenBSD 6.4 and 6.5