-
Notifications
You must be signed in to change notification settings - Fork 279
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
[feature] #2434: FFI bindgen library #2314
Merged
mversic
merged 15 commits into
hyperledger-iroha:iroha2-dev
from
mversic:ffi_common_arg_convert
Jul 22, 2022
Merged
[feature] #2434: FFI bindgen library #2314
mversic
merged 15 commits into
hyperledger-iroha:iroha2-dev
from
mversic:ffi_common_arg_convert
Jul 22, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
label
Jun 3, 2022
mversic
commented
Jun 3, 2022
mversic
force-pushed
the
ffi_common_arg_convert
branch
2 times, most recently
from
June 3, 2022 15:03
1a880b2
to
4b02d18
Compare
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #2314 +/- ##
==============================================
- Coverage 67.61% 66.77% -0.84%
==============================================
Files 140 145 +5
Lines 26173 27150 +977
==============================================
+ Hits 17696 18130 +434
- Misses 8477 9020 +543
Help us with your feedback. Take ten seconds to tell us how you rate us. |
mversic
force-pushed
the
ffi_common_arg_convert
branch
from
June 3, 2022 15:20
4b02d18
to
e008574
Compare
mversic
requested review from
s8sato,
appetrosyan,
Arjentix,
SamHSmith,
QuentinI,
outoftardis and
ilchu
as code owners
June 3, 2022 16:05
mversic
force-pushed
the
ffi_common_arg_convert
branch
from
June 3, 2022 16:43
e008574
to
aa5d343
Compare
mversic
commented
Jun 3, 2022
mversic
commented
Jun 3, 2022
mversic
force-pushed
the
ffi_common_arg_convert
branch
3 times, most recently
from
June 3, 2022 17:30
96ed308
to
65840fc
Compare
Arjentix
reviewed
Jun 4, 2022
mversic
force-pushed
the
ffi_common_arg_convert
branch
from
June 6, 2022 09:25
65840fc
to
55158fa
Compare
mversic
force-pushed
the
ffi_common_arg_convert
branch
2 times, most recently
from
June 6, 2022 20:10
2c64900
to
5c9ef15
Compare
appetrosyan
changed the title
[refactor] #0000: extract FFI conversion logic to separate module
[refactor] #2327: extract FFI conversion logic to separate module
Jun 7, 2022
mversic
force-pushed
the
ffi_common_arg_convert
branch
2 times, most recently
from
June 7, 2022 07:55
6be3eb2
to
9406231
Compare
outoftardis
reviewed
Jun 7, 2022
mversic
force-pushed
the
ffi_common_arg_convert
branch
from
June 7, 2022 08:40
9406231
to
d35ecfc
Compare
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
force-pushed
the
ffi_common_arg_convert
branch
3 times, most recently
from
July 22, 2022 12:55
f06bbbe
to
8270fc1
Compare
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
force-pushed
the
ffi_common_arg_convert
branch
from
July 22, 2022 14:29
8270fc1
to
586d59a
Compare
s8sato
approved these changes
Jul 22, 2022
Erigara
approved these changes
Jul 22, 2022
mversic
changed the title
[refactor] #2434: extract FFI conversion logic to separate module
[feature] #2434: FFI bindgen library
Jul 22, 2022
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Jul 22, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
This was referenced Jul 25, 2022
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 6, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 6, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 6, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 7, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 8, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 9, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 9, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic
added a commit
to mversic/iroha
that referenced
this pull request
Sep 9, 2022
…oha#2314) Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Marin Veršić marin.versic101@gmail.com
Description of the Change
I've found that often times I need to traverse the type and produce conversions from source to FFI compliant type and vice versa.
There have been a lot of code duplication and convoluted logic which this PR aims to resolve
Traits which enable this happen:
ReprC
,AsReprC
,TryFromReprC
IntoFfi
. ARust
structure is converted into an intermediary FFI struct viaIntoFfi
which implements theAsReprC
and can be converted into a type that can cross FFI boundary. This goes the other way as well - FFIReprC
type is converted into a struct viaTryFromReprC
catch_unwind
to prevent UB when panicking over FFIIssue
Closes #2327
Benefits
Possible Drawbacks
Usage Examples or Tests [optional]
Alternate Designs [optional]