combindings and directxbindings

Ethan gooberman at gmail.com
Mon Sep 7 21:17:40 UTC 2020


On Monday, 7 September 2020 at 19:35:41 UTC, Dennis wrote:
> Have you considered publishing it to code.dlang.org?

Not yet. Pretty busy at the moment, should probably wait for them 
to be actually designated usable before doing so.

> I noticed there's already
> https://code.dlang.org/packages/aurora-directx and 
> https://code.dlang.org/packages/directx-d, have you checked 
> these out?

Aurora DirectX does not convert a bunch of defines (specifically 
the macro expansions). DirectX-D does not preserve the COM 
attributes. Both are licensed in a way that will require 
attribution for source, and binaries for DirectX-D. Attribution 
for COM bindings? Nah. These *should* be autogenerated by a 
machine exclusively, but I haven't sat down to solve that 
particular problem yet thanks to the fact that you'll end up 
having to parse C headers every single time to get complete 
bindings.

One thing I forgot to mention about the glue layer in combindings 
- it will parse named enumeration types and provide aliases to 
each member in the package namespace. Again, this facilitates 
copy/paste code. There's absolutely nothing stopping anyone 
applying combindings to those two alternative libraries and 
taking advantage of this, in fact. Not having the UDAs means you 
won't get the convenience methods to make your code more D-like, 
but you can at least convert C/C++ enumeration manipulations 
simply by copy/pasting the code in to D.


More information about the Digitalmars-d-announce mailing list