-
Notifications
You must be signed in to change notification settings - Fork 412
0.0.117 Bindings Changes #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.0.117 Bindings Changes #2644
Conversation
...as the bindings generation does not currently have the ability to map a reference to a `NodeId` inside a tuple.
.. as the current C bindings generator isn't capable of handling type aliases in generics in type alias definition currently.
Bindings can't handle references in return types, so reduce the visibility to pub(crate).
Re-exports in Rust make `use` statements a little shorter, but for otherwise don't materially change a crate's API. Sadly, the C bindings generator currently can't figure out re-exports, but it also exports everything into one global namespace, so it doesn't matter much anyway.
The bindings currently get confused by the implicit `Sign` type, so we temporarily remove it on the `impl` here.
Re-exports in Rust make `use` statements a little shorter, but for otherwise don't materially change a crate's API. Sadly, the C bindings generator currently can't figure out re-exports, but it also exports everything into one global namespace, so it doesn't matter much anyway.
Having struct fields with references to other structs is tough in our bindings logic, but even worse if the fields are in an enum. Its simplest to just take the clone penalty here.
These really could be handled in the bindings, but for lack of immediate users there's not a strong reason to, so instead we just disable them for now.
The scorer currently relies on an associated type for the fee parameters. This isn't supportable at all in bindings, and for lack of a better option we simply hard-code the parameter for all scorers to `ProbabilisticScoringFeeParameters`.
These are not expressible in C/most languages, and thus must be hidden.
Rather than `ChannelMonitor` only being clonable when the signer is clonable, we require all signers to be clonable and then make all `ChannelMonitor`s clonable.
@@ -418,6 +420,8 @@ impl Utxo { | |||
} | |||
|
|||
/// Returns a `Utxo` with the `satisfaction_weight` estimate for a SegWit v0 P2WPKH output. | |||
/// | |||
/// This is not exported to bindings users as WPubkeyHash is not yet exported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you need to add the #cfg here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"This is not exported to bindings users" is a magic string for the bindings generator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jesus christ. But ok
@@ -402,6 +402,8 @@ impl Utxo { | |||
} | |||
|
|||
/// Returns a `Utxo` with the `satisfaction_weight` estimate for a P2WPKH nested in P2SH output. | |||
/// | |||
/// This is not exported to bindings users as WPubkeyHash is not yet exported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto here?
Luckily a bit less than 0.0.116 now that we landed some bits upstream.