You could look through this repo for a bare metal example: <https://github.com/EmbeddedNim/picostdlib>
Nim doesn’t really require too much, or generally require string.h or similar. The main thing to worry about is memory allocation. See the Nim Compiler docs for setting that up: <https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems>