Are there any plans to be able to run a source file without creating a binary file?
For example, when running nim c -r main.nim:
The results are a native binary and nimcache folder.
I like how golang handles this:
When running go run main.go:
It runs the program in a tmp directory: /tmp/go-build680322009/b001/exe/main and returns output.
nim c -r main.nim && rm ./main does the job.
foo bar: nim c -r main.nim foo bar => rm ./main won't be calledWhy is this feature reasonable? What's so bad about a binary being produced?
A better version of @Araq's command is:
nim c -r --out:/tmp/blah main.nim
Let's say you have 50 nim files in a folder, it takes more time to find the file you want, when there is:
file.nim and file binary file, so now there are 100 files total.
@dom96 nim c -r --out:/tmp/blah main.nim Would work, but it is not as simple as go run main.go
You can easily create an alias in your shell for that command.
Thanks @dom96.
alias nimr='nim c -r --out:/tmp/nim-cache' Works perfectly.
Most helpful comment
Why is this feature reasonable? What's so bad about a binary being produced?
A better version of @Araq's command is: