Exploring Rust: A C Programmers Insight

Much has been said of Rust in the last few years, and thus I will not add to the endless byte stream of “What Rust is and why it is better than everything else!”. This blog will assume at a basic level that you know what Rust is, and you're interested in hearing my opinion.
I currently work at Ciena as a New Grad Embedded Software Engineer. For the last year or so, I've primarily written in C. I've started to learn the language, but I'm no expert. I’ve always enjoyed learning new things, and my friend Matt Brown has encouraged me to try Rust out.
How Did I Learn?
I first followed loosely along with the Rust book, and completed the Async Web Server Final Project. It was very nice to have a guided tour through some of the more interesting parts of the language.
Next, I wanted to create a CLI tool - so as a true Linux nerd I copycatted the greatest program known to man… NEOFETCH!
Mine is much lighter than the original, but you get the point.
I’m still by no means an expert at Rust - it’s true what folks say; the learning curve is very steep.
What Do I Like About Rust?
I loved the 'nice things' that Rust comes with: rust-fmt, the compile messages, and a built-in package manager. These are all things that folks like me in older software environments do not get to enjoy. Because of this, I found myself having a tonne of fun writing Rust.
This might be some reason why Rust is always the most admired/loved language of the year. It’s young engineers like myself coming from things like C/C++ knowing that there must be a better way to work out there.
In terms of language features, I loved the way the compiler forces you to handle all situations. I liked match statements in favour of switch statements or if-else tree’s in C. Writing these on my own was when the gears turned and I understood why Rust could be important to use in a safety-critical environment.
fn main() {
let test_int = 1;
match test_int {
1 => {
println!("The line is 1!");
}
_ => {
println!("default value!")
}
}
}
What I’m Struggling With
Like many folks, I’m still struggling with the different types of ‘strings’ and when I should use what (String vs &str). It seems like I’m not the only one which is nice to know.
As well in general, just learning a new language. Especially one like Rust which has a little bit of it’s own spice in terms of what the syntax looks like.
Conclusion
In general, I have enjoyed my time with Rust so far, and look forward to working with it some more :) stay tuned for any future blog posts on any Rust projects I write. I’d personally love to get into some Embedded Rust.