Rust: CLI Tutorial, Building Your First Command Line Tool

Over the past nine steps, you have went over variables, memory ownership, control flow, custom data types, collections, error handling, and file organization. Today, we are going to combine those concepts into a single, functional Command Line Interface (CLI) application. Our project will be a System Scanner. It will accept a file name from the terminal, open and read that file, parse the data into custom Structs, and output a formatted report. ...

July 1, 2026 · Gregory Bryant

Rust: Modules and Traits, Organizing Code and Shared Behavior

When you first start learning to program, it is perfectly normal to dump all your variables, functions, and structs into a single file. But as your application grows from a small script into a fully-fledged system, a 1,000-line main.rs file becomes a nightmare to navigate. To build scalable software, you need two things: a way to split your code into multiple files, and a way to define shared behaviors across different custom data types. ...

June 29, 2026 · Gregory Bryant

Rust: Collections, Mastering Vectors and Strings

So far in this series, we have worked with data types that have a fixed size known at compile time, like a u32 integer or a boolean. These are fast and stored neatly on the “Stack.” But what if you are building an application where you don’t know how much data you will have until the program is actually running? If you are building a To-Do list, you don’t know if the user will add 3 items or 300. ...

June 25, 2026 · Gregory Bryant

Rust: Error Handling, Ditching Exceptions for Result and Option

In many programming languages, errors are treated as an afterthought. If a file is missing or a network request fails, the language throws an “Exception,” abruptly halting the normal flow of the program. If you forget to wrap that code in a try/catch block, your entire application crashes. Worse still is the billion-dollar mistake: the null value. Trying to access a value that happens to be null is a leading cause of software crashes worldwide. ...

June 23, 2026 · Gregory Bryant

Rust: Pattern Matching, Mastering the Match Operator

In our previous post, we explored how to model custom data using Enums, allowing a value to be exactly one of several distinct variants. But once you have data locked inside an Enum, how do you extract it and make decisions based on it? You could use a long, messy chain of if and else if statements. However, Rust provides a tool that is elegant and powerful, it will change how you write logic, the match operator. ...

June 16, 2026 · Gregory Bryant