AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Xmake Dlang

skill-xmake-io-xmake-skills-xmake-dlang · by xmake-io

Use when building D projects with xmake — binary/library targets with `.d` sources, DUB package integration via `add_requires("dub::...")`, and selecting DMD / LDC / GDC compilers.

No reviews yet
0 installs
5 views
0.0% view→install

Install

$ agentstack add skill-xmake-io-xmake-skills-xmake-dlang

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-xmake-io-xmake-skills-xmake-dlang)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Xmake Dlang? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Building D (dlang) with Xmake

D has three main compilers (DMD, LDC, GDC); xmake drives all of them through a unified target() API and supports DUB for package dependencies.

1. Minimal project

xmake create -l dlang -t console hello
cd hello
xmake run
add_rules("mode.debug", "mode.release")

target("hello")
    set_kind("binary")
    add_files("src/*.d")

2. Target kinds

target("app")       set_kind("binary")
target("mylib")     set_kind("static")
target("mydyn")     set_kind("shared")

3. DUB dependencies (v2.3.6+)

add_requires("dub::vibe-d ~>0.9.5")
add_requires("dub::libasync")

target("app")
    set_kind("binary")
    add_files("src/*.d")
    add_packages("dub::vibe-d", "dub::libasync")

Known limitation: cascading transitive deps must be declared manually for now. Add every dep in the tree explicitly.

4. Compiler selection

xmake f --toolchain=dlang                    # DMD (default)
xmake f --toolchain=ldc
xmake f --toolchain=gdc

Or pin paths:

xmake f --toolchain=ldc --sdk=/opt/ldc-1.30

LDC is usually the best choice for release builds (LLVM backend, best optimization). DMD is fastest to compile with.

5. Flags

target("app")
    add_files("src/*.d")
    add_dcflags("-O", "-release")          -- passed to the D compiler
    add_ldflags("-Wl,--as-needed")

add_dcflags = D compiler flags. Each compiler has its own flag dialect — prefer portable ones or gate with if is_toolchain("ldc") then ... end.

6. Mixing D with C

target("app")
    set_kind("binary")
    add_files("src/main.d", "src/extern.c")    -- mix C and D in one target
    add_includedirs("include")

D can call C directly via extern (C) declarations on the D side. No bridging needed.

Pitfalls

  • Transitive DUB deps. You must add them manually until xmake's DUB integration is complete.
  • Compiler-specific flags leaking across toolchains. add_dcflags("-mattr=+avx2") works on LDC, fails on DMD. Gate with is_toolchain.
  • D shared libraries on Windows. DMD and LDC produce different import-library formats; stick to one per project on Windows.

When to branch out

  • Build modes → xmake-targets, xmake-build-optimization
  • Cross-compile → xmake-cross-compilation (LDC supports many targets)
  • Package management basics → xmake-packages

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.