PROGRAMMING ARTICLES

view all articles →
An Oguri Cap toy from Umamusume standing in front of a fruit market set, holding a mango with a happy expression on her face.

Rust Declarative Macros: Organization, Scoping, and Common Use-Cases

In our previous article, we covered what declarative macros are, and how to define and use them. In this article, we will focus on how to integrate them into your crate. That means we’ll cover macro scoping, organization, and exporting. We’ll also take a look at some common use-cases with examples. Hopefully, after reading these two articles, you’ll feel ready to start experimenting with declarative macros in your own crates! NOTE: This article is tested under the 2024 edition of Rust.For older code you may see some older patterns, like using a lot of `#[macro_use]` statements, but this article is going to focus on more modern practices. If something doesn’t compile for you, check your Rust version and edition.
Read More...
A picnic scene featuring Osaka, Sakaki, and Chiyo toys, sitting out in a grassy area someplace, with various fruits.

Rust Declarative Macros: A Simple and Practical Introduction

Macros are commonly presented as simple “text substitution” language features. But the way they’re implemented can change your experience using with them. The simplicity of a text-replacement-style implementation (sometimes referred to as C-style macros) can often lead to surprising and counter-intuitive results. As such, those feel simple to learn, but difficult to master and use safely. In Rust, however, macros work in a way that may be unfamiliar to many. They are recognized and processed during the compiler’s parsing phase. That can make them do some powerful things, but it also can make them a little hard to learn and understand initially. Since macros are a huge topic, there’s no way I’m going to be able to cover all of it in one article. So we’re only going to focus on a brief introduction to macros, as well as defining and using declarative macros. Updates: - 2026/10/08 - added an introduction covering what macros are, based on feedback from the Rust Users Forums.
Read More...
An Osaka toy from Azumanga Daioh sitting under a kotatsu with a strange cat at a desk next to her.

10 Things to Check on Your Static Website Before Launch

Though it’s taken me longer than expected, sigseis.dev is mostly done - with only a few remaining missing features and polish work. With this site being mostly finished, I thought it would be fun to write up a little article about some things you should check on your static sites! At least while it’s still fresh in my own mind. UPDATE: - 2026/08/04 - Added a section about “Optimizing Content Delivery”, dropped the “Sticky Headings” to be bonus content, and a small bit of text on `tabindex` in the accessibility section.
Read More...
A Chiyo toy from Azumanga Daioh standing at the front of a classroom.

How to Organize Rust Modules for Maintainability

Today I’d like to talk a bit about how I like to organize my Rust projects. In particular, I’d like to talk about modules (you cannot talk about project organization without talking about modules). First, I’ll define what modules are, and give a brief explanation for how they work. After that, I’ll explain my recommended approach for organizing modules in Rust.
Read More...