Do you think it'd be a good thing to put the .di file in the generated compiled lib? That'd be somewhat similar to the c# example. dmd myprog.d something.dll searches something.dll for a .di reference, and adds it to the compile command line if it's there.