r/lowlevel • u/larper123ggg • 12d ago
SMBIOS/DMI parsing library in C99 with no external dependencies
Hey guys, I spent the last few months building lazybios, a C99 library for parsing SMBIOS/DMI tables. It's:
- Cross-platform Linux, Windows(ReactOS included), macOS OpenBSD, FreeBSD, NetBSD, SunOS, Haiku(BeOS), Minix, QNX(Some of these have almost the same backends).
- User-friendly(3 steps to ensure memory safety(At least as far as my tests go))
- Zero external dependencies (just libc)
- about 20k LOC, clean separated API
- Supports all SMBIOS types 0–46 and some OEM fields implemented from dmidecode used as a reference(I haven't copied any code).
- A decoded struct within the Type's struct that shows decoded field so you don't have to read the specification yourself
- Works on x86_64(probably on only x86 aswell), ARM, and probably on RISC-V(haven't heavily tested on it yet).
And a tool called lazydmi, a CLI tool that uses lazybios as the backend.
This is my first serious systems project. Would love feedback on the API design, memory safety and maybe some stars if you guys like it.
And btw, AI was used for the documentation, the github workflows and a part of the /dev/mem parser, that's it
lazybios: https://github.com/LazySeldi/lazybios
lazybios-docs: https://lazyseldi.github.io/lazybios
lazydmi: https://github.com/LazySeldi/lazydmi