bespoke alternative C++ standard library for DSPs, FPGAs, ASICs. (not a troll)
From: Adrian Johnston
Date: Wed Mar 25 2026 - 20:08:06 EST
Hello,
I started out writing 3D real-time C++ on a 33MHz processor with 2MB
RAM. We didn't have an OS on the PS1 back then. Operating systems seem
insane once you have experienced not having one in the way.
And so I have a strange hobby. I was going to write my own bare bones
version of the C++ standard library just to have on hand because the
real one is too slow and bizarre. And it turned into a pretty
significant rewrite for DSPs, FPGAs, ASICs.
I know that nobody is going to start writing kernel code in C++, but I
figured I'd post it here in case someone wants to use it to write open
source firmware for Linux. (There is a kernel-msdos list but no
kernel-c++.)
I swear I have addressed most of the hate I would expect from a
community of C developers.
- Blazing fast compile times with ccache+ninja and no .pdb.
- Provides a framework for avoiding memory allocation overhead.
- Tries to just wrap libc with syntactic sugar as much as possible.
- No nonsense headers you can actually read.
- Includes a profiler and console.
- Uses C++20 to address usability but falls back to C++11.
It is libhatchet:
https://github.com/whatchamacallem/libhatchet
Again, not trolling. Hopefully it is an interesting curiosity at least.
Regards,
Adrian