blog | sven kanoldt

sharing thoughts on learning rust, open source projects and other tech stuff

EN | DE

your architecture diagram can't fail a build - cargo-deny can

The best guard for your architecture is probably already in your CI. You just use it for licenses. Architecture rules erode, whether people or agents write the code. With agents it's faster: the rule sits in the docs, the docs fall out of the context window, and the next shortcut compiles just fine. Let's make it stop compiling.

Read more ⟶

Designing Error Types in Rust Libraries

When designing error types in Rust, especially for libraries with a public API, there are several important considerations to keep in mind. This post will explore some of the important implications and common pitfalls when designing error types in Rust libraries. Further, we will look at thiserror and how the Rust standard library's std::io::Error can serve as a reference for designing your own error types.

Read more ⟶

What is a CIDR trie and how can it help you?

In this post, we will explore the CIDR trie data structure and how it can help you manage IP addresses and subnets in your Rust project.

Read more ⟶

What is the matter with `AsRef`?

the AsRef trait is everywhere in the std lib and very handy. However, the benefit using it is maybe not too obvious. But read on, and you will see some useful examples and where to apply it.

Read more ⟶