Hi,
You can see the compiler docs here https://nim-lang.org/docs/nimc.html
specifically you'll want to compile with --app:lib or --app:staticlib
Any functions you want exported in your library want to have {.exportc,dynlib,cdecl.} (you can skip dynlib if it's for a staticlib)