---
draft: true
title: "Hexagonal Architecture & DDD meet Rust"
description: "Building a Rust application following Hexagonal Architecture and DDD"
pubDate: 2026-06-02
image: "./assets/elixir.svg"
---

For the past years I've been developing web services in Rust.

In every single one of them, different design patterns were used, some more simple, some more complex.

That makes sense: You want to find the best tool for the job in every project, and so you come up with the architecture
that best fits the use case of the software you are building.

After all these years building web services I've found they all have a few characteristics in common that possibly apply to every kind of software:

+ Someone or something has to interact with your software to use it. (e.g. A network client, a real person, a code library...)
+ You software interacts with the outside world to ask for or send data.
+ Your software needs to be tested (To prevent blowing up production at 3am, we've all been there)
+ Your software will be read and maintained by someone (or an AI, who knows)

Given these assumptions I would conclude that whatever kind of software you are building, it needs to:

- Define clear boundaries between what your application wants to achieve and the outside chaotic world.
- Be mostly tested in a unit-test way, simple and free of the burdens of the outside world
- Be understandable by new devs, with clear naming conventions and good documentation

