I do not have any personal experience with it, but I have heard several success stories for Actually Portable Executables & Nim and there is this to try to ease the path for cosmopolitan libc fans: https://github.com/foxoman/cosmonim/blob/master/README.md