Intro to calling C libraries
Bradley Chatha
sealabjaster at gmail.com
Sun Feb 23 17:32:14 UTC 2025
On Thursday, 20 February 2025 at 21:10:29 UTC, Ian wrote:
> ...
Another cool aspect of ImportC is that you can use the D
compiler's header generator to generate .di files from C sources
- i.e. semi-automatic, native binding generation!
I say semi-automatic since it misses out things like macros, and
unfortunately the header generator actually spits out invalid D
code...
e.g. I have a script
[here](https://github.com/Juptune/juptune/blob/master/devops/scripts/gen-libsodium-di.bash) to generate bindings for libsodium.
More information about the Digitalmars-d-learn
mailing list