D libraries in other languages
Atila Neves
atila.neves at gmail.com
Thu Jan 24 10:30:59 UTC 2019
On Thursday, 24 January 2019 at 04:37:06 UTC, Manu wrote:
> On Wed, Jan 23, 2019 at 2:30 PM . . via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
>>
>> C++ is notoriously hard to use with other languages. Is D any
>> better?
>>
>> If I made a D library, how easy would it be to use it in other
>> languages (C, C++, Go, and Rust)?
>
> Approximately equally challenging as C++.
> You basically depend on `extern(C)`. In D you may gain one
> substantial
> advantage, in that you might create a system to automatically
> wrap the
> D-facing API in `extern(C)` export shims.
> So perhaps you can automate a lot of `extern(C)` boilerplate...
You automate pretty much all of it:
https://github.com/kaleidicassociates/autowrap
More information about the Digitalmars-d
mailing list