re: Rust working with paths VIEW POST


Nim lang one-liner Std Lib:

import os
echo getCurrentDir() / paramStr(1)


nim c -r file.nim param

(Its 2 Lines, but import can be passed on command with --import:os, so is 1)


Passing command line imports that's cheeting, still two lines just injected haha. I got the rust thing working thanks to Ben.


But you dont have to pass command line imports, you can use a file.nim.cfg:


But it was not about Code Golf anyways.

Well played 😁

Code of Conduct Report abuse