Building Libraries in the face of API and ABI changes [was Understanding SIGSEGV issues]
Russel Winder
russel at winder.org.uk
Fri Jan 11 05:31:58 UTC 2019
On Thu, 2019-01-10 at 13:09 -0500, Steven Schveighoffer via Digitalmars-d-
learn wrote:
>
[…]
> That is one problem with linking against C or C++ code -- changes to
> certain things (e.g. struct layout) don't change the mangling.
I am having nightmares trying to decide what to do with the Rust version based
around generate on demand or on version change. With bindgen in Rust though,
there is no need for manual tweaking so automated is possible. Except that it
puts a massive dependency burden on any project using it.
DStep generated bindings tend to need some manual tweaking that cannot be
automated, which is surprising given that bindgen can do things without manual
intervention for Rust.
> You may want to consider using dpp instead if possible.
DPP cannot build "out of the box" on Debian Sid, so I have not actually tried
it.
There are three audiences here:
1. People building libraries for their own use on their own machines.
2. People building for OS distributions.
3. People building to distribute to others who will not be building for
themselves.
Categories 1 and 2 could probably cope with automated generation despite the
huge dependency burden, assuming there are no version conflicts – this seems
to be a massive unsolved problem with Rust/Cargo/crates.io :-( .
Category 3 needs as light a weight and speed of build as possible, and the
ability to dynamically adapt to the APIs and ABIs of execution at run time.
On the other hand, suspect I may be the sole user of RUst and D bindings to
libdvbv5!
--
Russel.
===========================================
Dr Russel Winder t: +44 20 7585 2200
41 Buckmaster Road m: +44 7770 465 077
London SW11 1EN, UK w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20190111/1d0f0c19/attachment.sig>
More information about the Digitalmars-d-learn
mailing list