I've been working on a blog series where we design and implement a simulator for an embedded system, in this case the firmware for a 3D printer.
The first half of the Communications System article has just been completed and I was wondering what other people think of the way I've done things?
This somewhat resembles how we implemented communications between a PC and our CNC machine's motion controller at work, although it includes several adaptions to make use of the nice things Rust gives us (traits, generics, etc), and compensating for a couple design flaws we didn't find until several years after the product was released.
The project itself is on GitHub if you want to browse the source code: