-
Notifications
You must be signed in to change notification settings - Fork 403
0.0.112 Bindings Branch #1810
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.112 Bindings Branch #1810
Conversation
+ remove MaybeReadableArgs trait as it is now unused + remove onion_utils::DecodeInput as it would've now needed to be parameterized by the CustomOnionMessageHandler trait, and we'd like to avoid either implementing DecodeInput in messenger or having onion_utils depend on onion_message::* Co-authored-by: Matt Corallo <[email protected]> Co-authored-by: Valentine Wallace <[email protected]>
...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).
Currently `Writeable` is mapped manually, making it impossible to automatically map a trait method that is parameterized by `Writeable` (as is true for the `write` method on `KVStore`). Ultimately we'll want to move to automatically mapping `Writeable` like any other trait (only manually mapping the std `Write` and `Read` traits), so this is only a candidate for the bindings branch, not upstream. That may take a few releases, however.
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.
fd03e49
to
d6ae7e3
Compare
This doesn't change the API expressibility as its currently the only type of message that can be sent, but avoids a generation failure as we can't call `&self` methods on complex enums unless we can `clone` all the inner fields. The correct solution to this is to simply not expose those methods (which sucks, but at least for `OnionMessageContents` they don't really matter), but that doesn't have to come now.
d6ae7e3
to
83af710
Compare
Codecov ReportBase: 90.70% // Head: 90.73% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## 0.0.112-bindings #1810 +/- ##
====================================================
+ Coverage 90.70% 90.73% +0.03%
====================================================
Files 87 87
Lines 47364 47363 -1
Branches 47364 47363 -1
====================================================
+ Hits 42962 42977 +15
+ Misses 4402 4386 -16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This is a rebase of the still-relevant commits from the 0.0.111-bindings branch as well as #1809 backported. This should suffice for 0.0.112 bindings.