Here are some libraries for embedded you can get inspiration from[1]:
- msp430f5510 - Run Nim on MSP430f5510 micro-controller (6KB of RAM).[2]
- stm32f3 - Run Nim on STM32F3 micro-controller (16KB of RAM).[3]
- ardunimo - Nim wrapper for Arduino + LinkIt ONE SDK by Mediatek.[4]
- ardunimesp - Nim wrapper for Arduino ESP8266 framework + A tool for flash, compile and make the nim project into an Arduino project.[5]
[1] https://github.com/VPashkov/awesome-nim#embedded
[2] https://gitlab.com/jalexander8717/msp430f5510-nim
[3] https://github.com/mwbrown/nim_stm32f3
[4] https://github.com/gokr/ardunimo
[5] https://gitlab.com/NetaLabTek/Arduimesp
Also, yes abstracting a platform is a lot of pain but Nim accepts PR even for niche platforms like Haiku, Genode and Nintendo Switch.
Also with the upcoming destructors, the standard library will be GC-free so much more will be usable on embedded.