Commit graph

7 commits

Author SHA1 Message Date
Matt Corallo
5d045de8be [bindings] Fix genbindings.sh compile issues on OSX
There were two issues on OSX - we need to give gcc the clang
warnings flags because `gcc` *is* clang on OSX and we missed an
`-std=c++11` on one of the clang++ calls, causing compile failures.
2021-02-03 10:11:35 -05:00
Matt Corallo
53f2e25a96 [bindings] Use new non-null annotation feature in cbindgen
This adds a new annotation for objects we take by reference in the
C header indicating the pointers must not be null. We have to
disable some warning clang now dumps that we haven't annotated all
pointers, as cbindgen is not yet able to add a nullable annotation.
2021-02-03 10:11:28 -05:00
Matt Corallo
ecf736a9a5 strip binaries in genbindings.sh for better size comparison 2021-02-01 16:52:57 -05:00
Matt Corallo
9fe3124eb7 Use CARGO_PROFILE_RELEASE_LTO to fix bindings build on new cargo
Newer versions of cargo broke `cargo rustc -- -Clto` by passing
`-Cembed-bitcode=no` even in `--release`. Its somewhat unclear why
this is still the case on latest cargo given it broke, at least,
compilation of Firefox, as discovered by Val at [1]. We take the
approach they used there, even though they later walked it back [2]
but the issues noted there, especially in [3] don't seem
particularly concerning in our case.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1640982
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1654465
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1654465#c5
2020-11-23 11:12:49 -05:00
Matt Corallo
dce831ed20 Rename lightning C/C++ bindings library to libldk
This should fix #689.
2020-09-13 20:58:50 -04:00
Matt Corallo
dbf4f58987 Remove the bindings crate from the root namespace to let it break
Until we get the bindings generation process super stable, let the
bindings get stale with respect to the main repo while still letting
`cargo check` pass.
2020-09-13 20:58:50 -04:00
Matt Corallo
1af8a464b4 Add all the manually-generated bits for the c-bindings crate
Including:
 * A script to automatically generate all the rest,
 * Cargo.toml and cbindgen.toml,
 * manually-written wrapper types for a few types
2020-09-10 22:03:32 -04:00