We just got merged into Nim a `-d:nimNoQuit` option that you can add to your nimble script. (Not sure when nightly builds come out if you don't want to build your own Nim.) This makes `quit` in Nim a no op, so it doesn't try to import `proc_exit`. https://github.com/nim-lang/Nim/pull/19419/files