Movatterモバイル変換


[0]ホーム

URL:


DLang LogoDLang Tour
Menu

Run D program locally

D comes with a compilerdmd, a script-like run toolrdmd anda package managerdub.

DMD Compiler

TheDMD compiler compiles D file(s) and creates a binary.On the command lineDMD can be invoked with the filename:

dmd hello.d

There are many options that allow you to modify the behavior of theDMD compiler.Browse theonline documentation or rundmd --help for an overview of available flags.

On-the-fly compilation withrdmd

The helper toolrdmd, distributed with the DMD compiler,will make sure to compile all dependencies and automatically runsthe resulting application:

rdmd hello.d

On UNIX systems the shebang line#!/usr/bin/env rdmd can be puton the first line of an executable D file to allow a script-likeusage.

Browse theonline documentation or runrdmd --help for an overview of available flags.

Package managerdub

D's standard package manager isdub. Whendub isinstalled locally, a new projecthello can be created usingthe command line:

dub init hello

Runningdub inside this folder will fetch all dependencies, compile theapplication and run it.dub build will compile the project.

Browse theonline documentation or rundub help for an overview of available commands and features.

All available dub packages can be browsed through dub'sweb interface.

rdmd playground.d


[8]ページ先頭

©2009-2025 Movatter.jp