Author: Chris Woodruff

Packaging and Releasing a Rust CLI Tool

Packaging and Releasing a Rust CLI Tool

Day 40, and today we are looking at how to package and release your Rust CLI app. You have written the code, added argument parsing, handled the logic, and even written tests. Now it is time to get that shiny CLI tool into the hands of others.

This process will feel familiar if you have worked with .NET global tools. Rust’s cargo makes it easy to build, release, and share your command-line apps.

Continue Reading
Parsing Arguments and Writing Logic

Parsing Arguments and Writing Logic in Rust

We are up to Day 37, and today, we are continuing to build out our Rust CLI app. Last time, we set up a simple command-line tool using the clap crate. Now, it is time to dig a little deeper into parsing arguments, handling input validation, and structuring our logic cleanly.

If you are coming from the C# world, this is where you would probably set up your Program.cs to parse args, maybe use a library like CommandLineParser, and then branch out into your application logic. Rust gives you similar tools but with its own flavor.

Continue Reading
Reflection: Traits & Lifetimes—Power and Pain

Week 5: Reflecting on Traits & Lifetimes Power and Pain

You’ve made it to Day 35, and we’re wrapping up Week 5. This week was all about Rust’s generics, contracts, and lifetimes. If your brain feels like it has been doing deadlifts, that means you are doing it right. Traits and lifetimes bring a lot of power to Rus,t but they can also make your head spin if you are used to the more relaxed rules of C#.

Let us take a moment to look back on what we covered and how Rust compares to what you might be used to with C#.

Continue Reading
Lifetimes: Surviving the First Encounter

Lifetimes: Surviving the First Encounter

Day 32, and today we are stepping into one of Rust’s most talked-about features. If you have heard scary stories about lifetimes, do not worry. This is your first encounter, and we are going to make it approachable.

If you are coming from C#, the idea of lifetimes might feel strange at first. In .NET you lean on the garbage collector to handle memory cleanup. You create objects, and when they are no longer needed, the GC comes along and takes out the trash.

Rust does not have a garbage collector. It uses ownership and borrowing to manage memory. Lifetimes are how Rust keeps track of how long references are valid. They are the glue that ties Rust’s memory safety model together.

Continue Reading
Generics in Rust vs Generics in C#

Generics in Rust vs Generics in C#

Welcome to Day 31, and today we are diving into generics. If you are coming from C# this is probably familiar ground. You know and love List, Dictionary, and all the type-safe goodness that generics bring to your code.

Rust has generics too but with a twist. The syntax might look similar but Rust’s approach gives you some extra control and a few new things to think about.

Continue Reading