[GSoC 2026] Ninja Build Backend for DUB, wrap-up

Hariprakash hariprakash4389285 at gmail.com
Tue Aug 25 08:06:32 UTC 2026


Hi everyone,

I'm Hariprakash, this summer's GSoC contributor working on a 
native Ninja build backend for dub, mentored by Atila Neves. I 
should have been posting weekly updates here like others in the 
cohort and didn't, apologies for the silence. Sharing the full 
wrap-up now that coding is done.

What it does

dub currently invokes the compiler directly on every build, no 
persistent build graph, no incremental tracking, no parallelism 
across independent modules. This adds dub generate ninja, 
producing a correct build.ninja without changing how anyone 
already uses dub.

What got built

Generator skeleton, valid build.ninja for single and multi file 
projects (#3124)
Static libraries via a proper ar rule (#3132)
Sub-package targets, myapp:utils style (#3133)
Self-regeneration, build.ninja re-invokes dub generate ninja when 
dub.json, dub.selections.json, or the source list changes (#3134)
Full -makedeps integration for incremental rebuilds (#3141)
DMD/LDC/GDC support through dub's existing compiler flag 
translation

Challenges

The most useful feedback all summer was on what a test actually 
proves. My first -makedeps patch got rejected for testing 
incidentals, grepping generated text instead of behavior. I 
rewrote it so the test proves dependency tracking actually works 
end to end.

Also hit a real Windows bug. Unescaped colons in Windows paths 
were breaking Ninja's own colon syntax, since C:\ collides with 
Ninja's target:deps separator. Building on Windows from day one, 
as planned, caught this early instead of it turning into a field 
bug later.

Where it stands

Everything in the proposal is merged into dlang/dub. CI is green 
apart from a pre-existing Alpine LDC linker failure unrelated to 
this work. What's left is user-facing documentation for dub 
generate ninja, covering options, self-regeneration behavior, and 
incremental rebuild semantics.

Full write-up: 
https://gist.github.com/hariprakazz/2acafdf8b58fa6d8adafa85667c097be

Thanks to Atila for direct, honest review all summer, it made the 
project better even when it meant redoing things.


More information about the Digitalmars-d mailing list