Skip to content

Instantly share code, notes, and snippets.

Last active Feb 1, 2021
What would you like to do?

Example usage

➤ ./test.d --first arg --second arg2
["--first", "arg", "--second", "arg2"]
#!/usr/bin/env bash
src_dir="$(dirname "$0")/src"
# The options `` and `-L-fuse-ld=gold`
# make the compilation almost twice as fast in many situations.
# Explanation:
# * is in general a faster linker than the default one - ld.bfd
# * Using the standard library Phobos as a shared library, means there a lot
# less work for the linker in the first place
dmd -mv=build_scripts="$src_dir" \ -L-fuse-ld=gold \
-i -run "$1" "${@:2}"
#!/usr/bin/env -S sh -c '$(dirname $0)/ $0 $@'
// `/usr/bin/env -S` is supported by coreutils 8.30 or newer:
void main(string[] args)
import std.stdio : writeln;
args[1 .. $].writeln;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment