I definitely argue about rdmd - this is a great helper to work around your favorite compiler. The main use in documents:
rdmd [rdmd args] [compiler args] <source file>[.d] [executable args]
In all my D projects, I just used Bash scripts (with Cygwin if on Windows) and it worked fine. Here are some of my favorite snippets:
Run
The whole point of rdmd is to simplify the compile-edit-run loop for editing, and this makes it pretty simple:
rdmd helloworld.d [args]
rdmd will not run files with a shorter timestamp than the last compilation, so the next time you run the same source file without editing, it will simply go to the previously compiled executable.
Choose a compiler
Despite the name, you can use most rdmd compilers like GDC, LDC, and DMD like this:
rdmd --compiler=dmd ...
Addition:
Normally rdmd stores executables and *.obj files from your source in the temp directory, using tmpDir() in the rdmd source is basically some kind of magic to give rdmd feel of running *.d files as scripts. However, you can specify the output file with the -of flag:
rdmd -of"helloworld.exe" helloworld.d
Erich gubler
source share