You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tried to run the example of the nim-neel repo (https://github.com/Niminem/Neel) using nimcr. This failed because the nim-neel example requires you to pass --threads:on (and it also recommends passing --app:gui as well).
Currently you must edit the script to customize the arguments that are passed to the nim compiler. Thus I had to edit the example to make it work with nimcr. While this makes sense in many cases, it can also be a bit inconvenient like in this case. Another example would be if you wanted to switch between release and debug modes. It would thus be great if there was a way to pass arguments to the nim compiler through the command line as well.
One potential solution would be to let the user specify a ---nimcr-args (or perhaps --nim) argument that would be a string with the arguments that would be passed to the nim compiler. Another solution would be to assume any arguments starting with "-" and passed before the nim filename are meant for the nim compiler. That way you could do:
For extra safetly nimcr could check if any of those arguments is an existing file (in case there is someone crazy enough to want to run a script called "-d:debug".
The text was updated successfully, but these errors were encountered:
I recently tried to run the example of the nim-neel repo (https://github.com/Niminem/Neel) using nimcr. This failed because the nim-neel example requires you to pass --threads:on (and it also recommends passing --app:gui as well).
Currently you must edit the script to customize the arguments that are passed to the nim compiler. Thus I had to edit the example to make it work with nimcr. While this makes sense in many cases, it can also be a bit inconvenient like in this case. Another example would be if you wanted to switch between release and debug modes. It would thus be great if there was a way to pass arguments to the nim compiler through the command line as well.
One potential solution would be to let the user specify a ---nimcr-args (or perhaps --nim) argument that would be a string with the arguments that would be passed to the nim compiler. Another solution would be to assume any arguments starting with "-" and passed before the nim filename are meant for the nim compiler. That way you could do:
nimcr -d:debug my_nim_file.nim --my --script arguments
For extra safetly nimcr could check if any of those arguments is an existing file (in case there is someone crazy enough to want to run a script called "-d:debug".
The text was updated successfully, but these errors were encountered: