On Tuesday, 8 September 2026 at 07:34:09 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On 08/09/2026 6:31 PM, Rambutan wrote:
This is apparently a bug, as D interface files containing only
simple type definitions to replace C header files in D source
like di.di are supposed to behave like header files.
No they are not.
D generates metadata that must be compiled in.
.di files can only exist as derivatives of D files that have
been linked in.
Ah, I see! Does this mean that officially .di files are not
intended as a mechanism to provide C header file information to
D, and so such a use is a technical exercise pushing the envelope?
This use of .di files with C is the only one I have encountered
in practice, and they have been generated automatically from C
header files and edited to smooth out any wrinkles. Until this
encounter with doubles in structs this has all worked fine with
no compilation of the .di file.