I reckon it depends on what you are trying to hide? The source code itself or some routine that's running at the same time as your binary?
The only way to fully guarantee some source code protection is to obfuscate it before you compile.
Reverse engineering even a normal compiled binary is a lot of work, but it can be studied in memory. It's easy to obfuscate all identifier names and add computational noise (there are C/C++ products that do this), which will make reverse engineering harder but still doable.
The only way to entirely hide your most sensitive code is to have it run on a remote server that only you can access.
Everything that works with C/C++ should work with Nim.
You can also use templates instead of procs so that everything is a giant main() with goto control flow all over the place that is a pain to disassemble.