Install D locally

On the D language's website dlang.org the most recent compiler version of the reference compiler DMD (Digital Mars D) can be downloaded and installed:

Windows

macOS

Linux / FreeBSD / macOS

To quickly install dmd within your user directory, run: curl -fsS https://dlang.org/install.sh | bash -s dmd

Packages for various distributions are provided:

Other compilers

Besides the DMD reference compiler which uses its own backend, there are two other compilers that can be fetched through the dlang.org download section:

  • GDC which uses the GCC backend
  • LDC based on the LLVM backend

GDC and LDC aren't always at the most recent DMD frontend's versions, but provide better optimization levels as well as support for other platforms like e.g. ARM.

See the wiki for more information

rdmd playground.d

{{programOutput}}