BindBC codegen survey

IchorDev zxinsworld at gmail.com
Tue Sep 9 15:42:14 UTC 2025


On Tuesday, 9 September 2025 at 02:33:56 UTC, Luna wrote:
> On Sunday, 31 August 2025 at 11:12:42 UTC, IchorDev wrote:
>> What kind of documentation would there be?
>> If you mean documentation from the original project the 
>> bindings are for, then this is simply infeasible due to 
>> requiring an astronomical amount of time to convert, and the 
>> potential for documentation to be different between versions, 
>> etc.
>
> Only infeasible if the projects don’t provide documentation 
> [...]

I don't think you understood. BindBC projects usually support 
various different versions of a library. Over the course of many 
updates, a library's documentation often changes in ways that 
make it manifestly incompatible with older versions. For 
instance, when working on SDL2, I noticed that some functions and 
parameters had become obsolete over time, and the documentation 
reflected this. For projects that have frequent breaking changes, 
this problem can be even more complicated.

>>> constant version incompatibilities, slower compile times
>> 
>> Could you please elaborate on these two?
>
> Often I’ve used the ~> version identifier, but occasionally 
> you’ve updated the loader implementation, then updated one 
> library to use it and not another, while the patch releases end 
> up dependency incompatible.
> [...]
> Solving this would require locking dependencies for x.y.0

I don't think I ever updated the BindBC-Loader minor dependency 
version in a patch release. I might have missed updating some 
packages to use the latest BindBC-Loader for a while at some 
point, but that would be the time to create an issue.
These days almost all of the libraries use `"bindbc-loader": 
"~>1.1"`, so if I incremented the minor version of BindBC-Loader 
again it wouldn't cause the same problem this time, and you could 
even keep using the older BindBC-Loader version.

And what about compile times? Do you have any profiling results 
you could show?


More information about the Digitalmars-d mailing list