]> git.bitcoin.ninja Git - ldk-c-bindings/log
ldk-c-bindings
2 months agoPrint ref conversion in `write_(from|to)_c_conversion_to_ref_prefix`
Matt Corallo [Mon, 26 Aug 2024 19:47:01 +0000 (19:47 +0000)]
Print ref conversion in `write_(from|to)_c_conversion_to_ref_prefix`

Not idea why this was not true originally, but clearly when writing
a *reference* conversion, we should be doing so as a *reference*.

2 months agoUse native types when converting for for single-impl traits
Matt Corallo [Mon, 26 Aug 2024 19:40:32 +0000 (19:40 +0000)]
Use native types when converting for for single-impl traits

Now that we properly handle single-impl traits as Rust types (i.e.
in generic parameters), we have to handle "converting" single-impl
traits. Here we implement this, diverging from the impl of the
underlying impl'd trait by keeping the existing type as-passed and
only ref'ing it if required.

2 months agoHandle writing Rust types for single-impl traits
Matt Corallo [Mon, 26 Aug 2024 19:15:57 +0000 (19:15 +0000)]
Handle writing Rust types for single-impl traits

Single-impl traits which are marked no-export (like
`AChannelManager` in LDK) are mapped as the singular implementing
type, rather than a full-blown trait.

Here we handle this case when writing Rust objects (generally used
in writing generic bounds).

2 months agoEnsure we use the in-crate type for traits returning references
Matt Corallo [Mon, 26 Aug 2024 19:07:07 +0000 (19:07 +0000)]
Ensure we use the in-crate type for traits returning references

2 months agoimpl `Send`/`Sync`/`Deref`/deref method for opaque wrapper structs
Matt Corallo [Mon, 26 Aug 2024 19:05:06 +0000 (19:05 +0000)]
impl `Send`/`Sync`/`Deref`/deref method for opaque wrapper structs

This adds a "same item but as a reference/non-`is_owned`" helper
method for our opaque wrapper structs, as well as implements
`Deref` on them to the native type. Finally, it implements `Send`
and `Sync` on them by blindly assuming it is implemented on the
underlying struct.

2 months agoAdd a `*Ref` struct for traits and `Deref` to it rather than `Self`
Matt Corallo [Mon, 26 Aug 2024 18:52:07 +0000 (18:52 +0000)]
Add a `*Ref` struct for traits and `Deref` to it rather than `Self`

Because LDK often takes `Deref<Target=Trait>` as type parameters,
we'd implemented `Deref { type Target=Self; .. }` for the traits
defined in the bindings crate. This worked well, but because Rust
auto-`Deref`s, it can lead to spurious compilation failures due to
infinite recursion trying to deref.

In the past we've worked around this by coming up with alternative
compilation strategies when faced with `Deref` recursion, but we
don't strictly need to.

Instead, here, we introduce duplicates of all our `Trait` structs
which become the `Deref` `Target`. This way, we can `Deref` into
the `Trait` and maintain LDK compatibility, without having any
infinite `Deref` recursion issues.

One complication is traits which contain associated types to define
`Deref`s to another associated type, e.g.

trait A {
    type B;
    type C: Deref<Target = Self::B>;
}

In this case, `B` needs to be the `TraitRef` and `C` needs to be
the `Trait`. We add code specifically to detect this case.

2 months agoSupport serialization impls defined in a diff module from the type
Matt Corallo [Mon, 26 Aug 2024 18:49:30 +0000 (18:49 +0000)]
Support serialization impls defined in a diff module from the type

2 months agoAllow functions being mapped to be `const`
Matt Corallo [Mon, 26 Aug 2024 18:39:57 +0000 (18:39 +0000)]
Allow functions being mapped to be `const`

2 months agoHandle printing generic bounds on a trait impl better
Matt Corallo [Thu, 22 Aug 2024 22:59:49 +0000 (22:59 +0000)]
Handle printing generic bounds on a trait impl better

2 months agoStop relying on `impl Deref { type Target = Self; ...`
Matt Corallo [Tue, 20 Aug 2024 18:31:29 +0000 (18:31 +0000)]
Stop relying on `impl Deref { type Target = Self; ...`

... this has a tendency to cause `reached the recursion limit while
auto-dereferencing` errors, and even a dumb struct copy suffices to
avoid it.

5 months agoMerge pull request #126 from TheBlueMatt/main v0.0.123.1
Matt Corallo [Thu, 6 Jun 2024 13:45:01 +0000 (06:45 -0700)]
Merge pull request #126 from TheBlueMatt/main

0.0.123.1

5 months agoUpdate autogenerated bindings to latest LDK 0.0.123-bindings
Matt Corallo [Tue, 4 Jun 2024 17:49:46 +0000 (17:49 +0000)]
Update autogenerated bindings to latest LDK 0.0.123-bindings

5 months agoHandle `Vec`s resolved as `alloc::vec::Vec`
Matt Corallo [Tue, 4 Jun 2024 17:47:02 +0000 (17:47 +0000)]
Handle `Vec`s resolved as `alloc::vec::Vec`

Up until now we'd always relied on `Vec`s being imported through a
prelude, but LDK sometimes forgets to keep doing that. Thus, here
we move to also accepting `alloc::vec::Vec` by mapping it to `Vec`
during name resolution.

5 months agoimpl `Display` properly even if its written as `core::fmt::Display`
Matt Corallo [Tue, 4 Jun 2024 15:51:25 +0000 (15:51 +0000)]
impl `Display` properly even if its written as `core::fmt::Display`

6 months agoMerge pull request #124 from TheBlueMatt/main v0.0.123.0
Matt Corallo [Wed, 15 May 2024 18:57:33 +0000 (11:57 -0700)]
Merge pull request #124 from TheBlueMatt/main

Update to LDK 0.0.123

6 months agoPin compiler_builtins to 0.1.109 when building std
Matt Corallo [Wed, 15 May 2024 02:33:32 +0000 (02:33 +0000)]
Pin compiler_builtins to 0.1.109 when building std

See https://github.com/rust-lang/compiler-builtins/issues/610

6 months agoUpdate C/C++ demo to latest LDK API
Matt Corallo [Sun, 12 May 2024 01:05:49 +0000 (01:05 +0000)]
Update C/C++ demo to latest LDK API

6 months agoUpdate auto-generated bindings to LDK 0.0.123
Matt Corallo [Sun, 12 May 2024 14:56:09 +0000 (14:56 +0000)]
Update auto-generated bindings to LDK 0.0.123

6 months agoUpdate CI/Cargo.toml to point to LDK 0.0.123's bindings branch
Matt Corallo [Sun, 12 May 2024 14:39:16 +0000 (14:39 +0000)]
Update CI/Cargo.toml to point to LDK 0.0.123's bindings branch

6 months agoUpdate hard-coded type definitions
Matt Corallo [Sun, 12 May 2024 14:35:12 +0000 (14:35 +0000)]
Update hard-coded type definitions

6 months agoExpose a `BigEndianScalar_clone` method
Matt Corallo [Mon, 13 May 2024 18:31:53 +0000 (18:31 +0000)]
Expose a `BigEndianScalar_clone` method

6 months agoSupport clone for `ThreeBytes`
Matt Corallo [Sun, 12 May 2024 14:35:21 +0000 (14:35 +0000)]
Support clone for `ThreeBytes`

6 months agoAdd a `TweakedPubKey` to mirror `bitcoin::key::TweakedPublicKey`
Matt Corallo [Thu, 29 Feb 2024 21:15:47 +0000 (21:15 +0000)]
Add a `TweakedPubKey` to mirror `bitcoin::key::TweakedPublicKey`

6 months agoWrite out real generics when calling trait methods
Matt Corallo [Thu, 25 Apr 2024 20:08:27 +0000 (20:08 +0000)]
Write out real generics when calling trait methods

This avoids issues where a trait has a generic which can't be
resolved.

6 months agoCorrect separator writing in generic writing
Matt Corallo [Thu, 29 Feb 2024 21:14:11 +0000 (21:14 +0000)]
Correct separator writing in generic writing

6 months agoHandle `-> ()` as an fn return value
Matt Corallo [Thu, 29 Feb 2024 14:56:22 +0000 (14:56 +0000)]
Handle `-> ()` as an fn return value

6 months agoHandle `self: [&*] Self` as argument rather than just `[*&]self`
Matt Corallo [Thu, 29 Feb 2024 14:55:39 +0000 (14:55 +0000)]
Handle `self: [&*] Self` as argument rather than just `[*&]self`

6 months agoMerge pull request #123 from TheBlueMatt/main v0.0.122.0
Matt Corallo [Thu, 25 Apr 2024 20:52:13 +0000 (13:52 -0700)]
Merge pull request #123 from TheBlueMatt/main

Update CI/Cargo.toml references to 0.0.122

6 months agoUpdate CI/Cargo.toml references to 0.0.122
Matt Corallo [Mon, 22 Apr 2024 22:32:22 +0000 (22:32 +0000)]
Update CI/Cargo.toml references to 0.0.122

8 months agoMerge pull request #122 from TheBlueMatt/main v0.0.121.4
Matt Corallo [Thu, 14 Mar 2024 01:37:55 +0000 (01:37 +0000)]
Merge pull request #122 from TheBlueMatt/main

Disable asan checks which are hitting an asan regression

8 months agoDisable asan checks which are hitting an asan regression
Matt Corallo [Thu, 14 Mar 2024 01:36:54 +0000 (01:36 +0000)]
Disable asan checks which are hitting an asan regression

8 months agoMerge pull request #121 from TheBlueMatt/main v0.0.121.3
Matt Corallo [Tue, 5 Mar 2024 21:45:28 +0000 (21:45 +0000)]
Merge pull request #121 from TheBlueMatt/main

Fix cargo cache wiping for new registry and for empty caches

8 months agoFix cargo cache wiping for new registry and for empty caches
Matt Corallo [Fri, 1 Mar 2024 19:25:59 +0000 (19:25 +0000)]
Fix cargo cache wiping for new registry and for empty caches

9 months agoMerge pull request #119 from arik-so/arik/2024/01/skip-tests-option v0.0.121.2
Matt Corallo [Fri, 9 Feb 2024 01:30:03 +0000 (01:30 +0000)]
Merge pull request #119 from arik-so/arik/2024/01/skip-tests-option

Create an option to skip tests

9 months agoRun cargo commands when skipping tests.
Arik Sosman [Wed, 7 Feb 2024 01:51:31 +0000 (17:51 -0800)]
Run cargo commands when skipping tests.

9 months agoMove test-skipping effect to be prior to sanity-
Arik Sosman [Mon, 5 Feb 2024 06:04:56 +0000 (22:04 -0800)]
Move test-skipping effect to be prior to sanity-
checking and running the gcc app.

9 months agoMerge pull request #120 from TheBlueMatt/main
Matt Corallo [Fri, 2 Feb 2024 00:27:32 +0000 (00:27 +0000)]
Merge pull request #120 from TheBlueMatt/main

Enable X-Lang LTO for extra builds/windows builds

9 months agoCreate an option to skip tests.
Arik Sosman [Tue, 30 Jan 2024 21:16:22 +0000 (13:16 -0800)]
Create an option to skip tests.

9 months agoEnable X-lang LTO for Windows x86-64 builds (or any extra build)
Matt Corallo [Thu, 1 Feb 2024 19:28:31 +0000 (19:28 +0000)]
Enable X-lang LTO for Windows x86-64 builds (or any extra build)

9 months agoOptimize for sandy when building extra x86-64 builds
Matt Corallo [Thu, 1 Feb 2024 19:28:11 +0000 (19:28 +0000)]
Optimize for sandy when building extra x86-64 builds

9 months agoMerge pull request #118 from TheBlueMatt/main v0.0.121.1
Matt Corallo [Thu, 25 Jan 2024 22:43:16 +0000 (22:43 +0000)]
Merge pull request #118 from TheBlueMatt/main

Stop using designated initializer for array in C++ demo

9 months agoStop using designated initializer for array in C++ demo
Matt Corallo [Thu, 25 Jan 2024 21:42:33 +0000 (21:42 +0000)]
Stop using designated initializer for array in C++ demo

This seems to be no issue on recent-ish compilers, but my Android
compiler seems to complain about it.

9 months agoMerge pull request #117 from TheBlueMatt/main v0.0.121.0
Matt Corallo [Thu, 25 Jan 2024 17:23:51 +0000 (17:23 +0000)]
Merge pull request #117 from TheBlueMatt/main

Update to 0.0.121

9 months agoDrop stale pins in CI due to rustc bump
Matt Corallo [Thu, 25 Jan 2024 04:38:27 +0000 (04:38 +0000)]
Drop stale pins in CI due to rustc bump

9 months agoBump CI to Debian bookworm due to new LDK MSRV
Matt Corallo [Thu, 25 Jan 2024 04:24:57 +0000 (04:24 +0000)]
Bump CI to Debian bookworm due to new LDK MSRV

9 months agoUpdate CI and Cargo.toml branch names to LDK 0.0.121
Matt Corallo [Tue, 23 Jan 2024 21:54:06 +0000 (21:54 +0000)]
Update CI and Cargo.toml branch names to LDK 0.0.121

9 months agoUpdate auto-generated bindings to LDK 0.0.121
Matt Corallo [Tue, 23 Jan 2024 21:52:28 +0000 (21:52 +0000)]
Update auto-generated bindings to LDK 0.0.121

9 months agoUpdate C/C++ demo tests with latest 0.0.121 API changes
Matt Corallo [Tue, 23 Jan 2024 20:03:14 +0000 (20:03 +0000)]
Update C/C++ demo tests with latest 0.0.121 API changes

9 months agoAdd support for resolving 33-byte arrays, though its unused
Matt Corallo [Tue, 23 Jan 2024 20:02:35 +0000 (20:02 +0000)]
Add support for resolving 33-byte arrays, though its unused

9 months agoIgnore `Debug` bounds on generics which may be redundant
Matt Corallo [Tue, 23 Jan 2024 20:01:23 +0000 (20:01 +0000)]
Ignore `Debug` bounds on generics which may be redundant

9 months agoUse resolved-type matching rather than as-written in trait exposing
Matt Corallo [Tue, 23 Jan 2024 20:00:31 +0000 (20:00 +0000)]
Use resolved-type matching rather than as-written in trait exposing

9 months agoExpose accessors for `TxIn` and `TxOut`
Matt Corallo [Tue, 23 Jan 2024 22:31:55 +0000 (22:31 +0000)]
Expose accessors for `TxIn` and `TxOut`

The fields themselves are already public, so there's not a lot of
value for C users for these, but it avoids having to have this
logic written out by hand in the Java bindings, which is nice.

9 months agoUpdate rust-bitcoin wrappers to latest rust-bitcoin/secp
Matt Corallo [Tue, 23 Jan 2024 20:10:18 +0000 (20:10 +0000)]
Update rust-bitcoin wrappers to latest rust-bitcoin/secp

9 months agoIgnore `Send` and `Sync` bounds when resolving generics
Matt Corallo [Tue, 23 Jan 2024 20:09:51 +0000 (20:09 +0000)]
Ignore `Send` and `Sync` bounds when resolving generics

9 months agoAdd support for implementing traits with a `Debug` requirement
Matt Corallo [Tue, 23 Jan 2024 20:09:25 +0000 (20:09 +0000)]
Add support for implementing traits with a `Debug` requirement

10 months agoSupport passing lifetime'd enums to C
Matt Corallo [Fri, 29 Dec 2023 20:50:22 +0000 (20:50 +0000)]
Support passing lifetime'd enums to C

While this is generally unsafe, we have to do something for
`CandidateRouteHop`, which is passed to the scorer. Because its
incredibly performance-sensitive, forcing the bindings users to
take a performance hit just to make the scoring interface marginally
safer seems like a bad trade-off.

12 months agoMerge pull request #116 from TheBlueMatt/main v0.0.118.2
Matt Corallo [Thu, 16 Nov 2023 17:23:22 +0000 (17:23 +0000)]
Merge pull request #116 from TheBlueMatt/main

Support Building on Fedora

12 months agoTest bindings on Fedora in addition to Debian
Matt Corallo [Thu, 16 Nov 2023 05:24:23 +0000 (05:24 +0000)]
Test bindings on Fedora in addition to Debian

12 months agoStop passing -mcpu on x86-64
Matt Corallo [Thu, 16 Nov 2023 03:01:34 +0000 (03:01 +0000)]
Stop passing -mcpu on x86-64

This is actually not supported, but we did it anyway because Debian
accepted it. Instead, we should rely on -march and -mtune

12 months agoProperly parse Fedora's clang version string
Matt Corallo [Thu, 16 Nov 2023 02:34:43 +0000 (02:34 +0000)]
Properly parse Fedora's clang version string

12 months agoMerge pull request #115 from TheBlueMatt/main v0.0.118.1
Matt Corallo [Fri, 10 Nov 2023 02:07:56 +0000 (02:07 +0000)]
Merge pull request #115 from TheBlueMatt/main

Fix race in peer connection in C++ demo app

12 months agoAdd simple wrapper to call clang with a windows target
Matt Corallo [Thu, 9 Nov 2023 22:10:17 +0000 (22:10 +0000)]
Add simple wrapper to call clang with a windows target

This enables building for Windows with the existing
LDK_C_BINDINGS_EXTRA_TARGETS and LDK_C_BINDINGS_EXTRA_TARGETS_CCS
environment variables.

12 months agoFix race in peer connection in C++ demo app
Matt Corallo [Sun, 29 Oct 2023 18:40:47 +0000 (18:40 +0000)]
Fix race in peer connection in C++ demo app

When we disconnect then immediately reconnect from one peer we may
still get the second connection through before the disconnection is
handled on the other end, causing connection failures. We fix this
here by disconnecting on both ends before reconnecting.

12 months agoMerge pull request #114 from TheBlueMatt/main v0.0.118.0
Matt Corallo [Fri, 27 Oct 2023 15:49:07 +0000 (15:49 +0000)]
Merge pull request #114 from TheBlueMatt/main

0.0.118

12 months agoUpdate Cargo.toml and CI references to LDK 0.0.118
Matt Corallo [Tue, 24 Oct 2023 00:48:49 +0000 (00:48 +0000)]
Update Cargo.toml and CI references to LDK 0.0.118

12 months agoUpdate C/C++ demo to LDK 0.0.118 API
Matt Corallo [Mon, 23 Oct 2023 23:37:30 +0000 (23:37 +0000)]
Update C/C++ demo to LDK 0.0.118 API

12 months agoUpdate auto-generated bindings to LDK 0.0.118
Matt Corallo [Tue, 24 Oct 2023 00:48:26 +0000 (00:48 +0000)]
Update auto-generated bindings to LDK 0.0.118

12 months agoSupport trait impls on enums
Matt Corallo [Mon, 23 Oct 2023 23:45:03 +0000 (23:45 +0000)]
Support trait impls on enums

Previously we'd only generate correct code for trait impls on
structs, but there's no reason for that restriction. Here we also
implement it on enums.

12 months agoCorrect manual conversion for `ChainHash`
Matt Corallo [Mon, 23 Oct 2023 23:36:44 +0000 (23:36 +0000)]
Correct manual conversion for `ChainHash`

13 months agoDrop `#[no_mangle]` from `*_write_void` to make cbindgen not export
Matt Corallo [Mon, 16 Oct 2023 01:35:28 +0000 (01:35 +0000)]
Drop `#[no_mangle]` from `*_write_void` to make cbindgen not export

cbindgen recently switched to exporting all `#[no_mangle]` and
`extern "C"` functions. Our `*_write_void` methods are
internal-only but we'd marked them `#[no_mangle]`, which resulted
in them spuriously appearing in `lightning.h`.

13 months agoMerge pull request #113 from TheBlueMatt/main v0.0.117.1
Matt Corallo [Mon, 9 Oct 2023 16:43:17 +0000 (16:43 +0000)]
Merge pull request #113 from TheBlueMatt/main

Update args on supertraits of supertraits when cloning trait impls

13 months agoUpdate auto-generated bindings
Matt Corallo [Sun, 8 Oct 2023 06:07:21 +0000 (06:07 +0000)]
Update auto-generated bindings

13 months agoUpdate args on supertraits of supertraits when cloning trait impls
Matt Corallo [Sun, 8 Oct 2023 05:53:25 +0000 (05:53 +0000)]
Update args on supertraits of supertraits when cloning trait impls

When cloning implementations of traits from in-crate structs, we
forgot to update the arguments for supertraits of supertraits,
causing methods on that trait to be called against the previous
struct, not the cloned one.

This was ultimately identified downstream in the Java bindings,
fixes https://github.com/lightningdevkit/ldk-garbagecollected/issues/138

13 months agoDrop unused parameter from `get_module_type_resolver`
Matt Corallo [Sun, 8 Oct 2023 05:52:44 +0000 (05:52 +0000)]
Drop unused parameter from `get_module_type_resolver`

13 months agoMerge pull request #112 from TheBlueMatt/main v0.0.117.0
Matt Corallo [Fri, 6 Oct 2023 03:35:55 +0000 (03:35 +0000)]
Merge pull request #112 from TheBlueMatt/main

Upgrade to 0.0.117

13 months agoAvoid dependencies of build-deps on MacOS by pinning cc
Matt Corallo [Thu, 5 Oct 2023 01:22:09 +0000 (01:22 +0000)]
Avoid dependencies of build-deps on MacOS by pinning cc

Sadly we have to hack around cargo to make this work with
`-Zbuild-std`.

13 months agoPin memchr so that no-std builds work
Matt Corallo [Wed, 4 Oct 2023 20:57:16 +0000 (20:57 +0000)]
Pin memchr so that no-std builds work

13 months agoUpdate CI and Cargo.toml references to 0.0.117-bindings
Matt Corallo [Wed, 4 Oct 2023 00:34:55 +0000 (00:34 +0000)]
Update CI and Cargo.toml references to 0.0.117-bindings

13 months agoUpdate auto-generated bindings
Matt Corallo [Thu, 28 Sep 2023 03:21:08 +0000 (03:21 +0000)]
Update auto-generated bindings

13 months agoInclude argument info docs on all-pub struct constructors
Matt Corallo [Sun, 1 Oct 2023 23:05:26 +0000 (23:05 +0000)]
Include argument info docs on all-pub struct constructors

Fixes https://github.com/lightningdevkit/ldk-garbagecollected/issues/129

13 months agoUpdate C/C++ demo bindings and ldk-net to LDK 0.0.117
Matt Corallo [Thu, 28 Sep 2023 01:19:46 +0000 (01:19 +0000)]
Update C/C++ demo bindings and ldk-net to LDK 0.0.117

13 months agoUpdate hardcoded and manually-defined types for LDK 0.0.117
Matt Corallo [Thu, 28 Sep 2023 00:38:27 +0000 (00:38 +0000)]
Update hardcoded and manually-defined types for LDK 0.0.117

13 months agoDrop `#[no_mangle]`/`extern` flag for internal-only method
Matt Corallo [Tue, 3 Oct 2023 05:59:41 +0000 (05:59 +0000)]
Drop `#[no_mangle]`/`extern` flag for internal-only method

This prevents new `cbindgen` from generating bindings for things we
don't actually want to export.

13 months agoDrop `empty_val_check_suffix_from_path` for Signature as its unused
Matt Corallo [Thu, 28 Sep 2023 02:29:48 +0000 (02:29 +0000)]
Drop `empty_val_check_suffix_from_path` for Signature as its unused

13 months agoHandle type references which refer to a module defined in scope
Matt Corallo [Thu, 28 Sep 2023 02:33:58 +0000 (02:33 +0000)]
Handle type references which refer to a module defined in scope

eg
```
mod module;
fn a() -> module::Type { todo!() }
```

13 months agoPrint fewer types in call generics, leaning on rustc to pick types
Matt Corallo [Thu, 28 Sep 2023 01:16:56 +0000 (01:16 +0000)]
Print fewer types in call generics, leaning on rustc to pick types

Picking types is hard, its easier to make rustc do it.

13 months agoUse the resolved type name in generic strings, not the original
Matt Corallo [Thu, 28 Sep 2023 01:14:41 +0000 (01:14 +0000)]
Use the resolved type name in generic strings, not the original

This makes some generics less readable, but some more, and reduces
generic type pollution. Some cases are a loss, eg
`Option_PaymentHashZ` gets converted to `Option_ThirtyTwoBytesZ`
(which less less readable but fewer total types as a result), but
we ultimately need this because we now have `schnorr::Signature`
and `ecdsa::Signature` so we can't rely on just using `Signature`
and having it be unique :(.

13 months agoHandle `Deref<Self::Type>` bounds as `Self::Type`'s trait bound
Matt Corallo [Thu, 28 Sep 2023 00:36:43 +0000 (00:36 +0000)]
Handle `Deref<Self::Type>` bounds as `Self::Type`'s trait bound

13 months agoAccept `DerefMut` bounds on generics as if they were `Deref`
Matt Corallo [Thu, 28 Sep 2023 00:32:55 +0000 (00:32 +0000)]
Accept `DerefMut` bounds on generics as if they were `Deref`

13 months agoSupport `f64` as a primitive type
Matt Corallo [Tue, 26 Sep 2023 00:37:11 +0000 (00:37 +0000)]
Support `f64` as a primitive type

13 months agoimpl `DerefMut` for all traits
Matt Corallo [Tue, 26 Sep 2023 00:35:50 +0000 (00:35 +0000)]
impl `DerefMut` for all traits

This is sometimes required in LDK now, and there's no real reason
not to implement it.

13 months agoAllow `Sized` bounds
Matt Corallo [Tue, 26 Sep 2023 00:35:27 +0000 (00:35 +0000)]
Allow `Sized` bounds

There was no reason to only allow `Sized`, rustc will let us know
if something is wrong.

13 months agoInclude `String` in the default import, since we use it now
Matt Corallo [Tue, 26 Sep 2023 00:33:39 +0000 (00:33 +0000)]
Include `String` in the default import, since we use it now

15 months agoMerge pull request #110 from TheBlueMatt/main v0.0.116.0
Matt Corallo [Mon, 31 Jul 2023 15:36:08 +0000 (15:36 +0000)]
Merge pull request #110 from TheBlueMatt/main

LDK 0.0.116

15 months agoUpdate auto-generated bindings to LDK 0.0.116
Matt Corallo [Fri, 28 Jul 2023 23:27:07 +0000 (23:27 +0000)]
Update auto-generated bindings to LDK 0.0.116

15 months agoUpdate lightning-c-bindings Cargo.toml & CI to point to 0.0.116
Matt Corallo [Sat, 22 Jul 2023 18:20:36 +0000 (18:20 +0000)]
Update lightning-c-bindings Cargo.toml & CI to point to 0.0.116

15 months agoUpdate C/C++ demo apps for new upstream API
Matt Corallo [Sat, 22 Jul 2023 18:19:39 +0000 (18:19 +0000)]
Update C/C++ demo apps for new upstream API

15 months agoUpdate hard-coded types and add some new manual bitcoin types
Matt Corallo [Sat, 22 Jul 2023 18:19:08 +0000 (18:19 +0000)]
Update hard-coded types and add some new manual bitcoin types

15 months agoInclude a `struct` before trait return fields
Matt Corallo [Sun, 30 Jul 2023 03:36:56 +0000 (03:36 +0000)]
Include a `struct` before trait return fields

EIther `struct Type` or `Type` work fine because of our type
declarations, but cbindgen uses `struct Type` everywhere so its
easiest if we match it, especially for downstream code.

15 months agoAllow generation of manual types in reference options
Matt Corallo [Sat, 22 Jul 2023 20:03:11 +0000 (20:03 +0000)]
Allow generation of manual types in reference options

The limiting of supported types in `write_template_generics` isn't
super useful as its only called once per type - later uses of the
same type with the reference flag set or wiped doesn't change
anything. Still, it is relied on somewhat, so we can't drop it
entirely.

Now that we've moved more of the `[u8; 32]` newtypes to option
wrappers, failing for non-primitive references spuriously breaks.
Instead, we just allow it for manually-mapped types and let the
compiler complain if we do something invalid.