-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat: generate wallet ffi header file automatically #4183
Merged
aviator-app
merged 1 commit into
tari-project:testnet-dibbler
from
stringhandler:st-generate-ffi-header
Jun 13, 2022
Merged
feat: generate wallet ffi header file automatically #4183
aviator-app
merged 1 commit into
tari-project:testnet-dibbler
from
stringhandler:st-generate-ffi-header
Jun 13, 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
@@ -2437,15 +2418,15 @@ pub unsafe extern "C" fn completed_transaction_get_fee( | |||
pub unsafe extern "C" fn completed_transaction_get_timestamp( | |||
transaction: *mut TariCompletedTransaction, | |||
error_out: *mut c_int, | |||
) -> c_longlong { | |||
) -> c_ulonglong { |
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.
I believe this is the correct choice here and ditto for the rest
hansieodendaal
previously approved these changes
Jun 13, 2022
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.
LGTM
Works really well for the auto header generation! |
stringhandler
force-pushed
the
st-generate-ffi-header
branch
from
June 13, 2022 11:28
3b9b585
to
4e7b537
Compare
stringhandler
force-pushed
the
st-generate-ffi-header
branch
from
June 13, 2022 11:32
4e7b537
to
9d381c1
Compare
sdbondi
approved these changes
Jun 13, 2022
This is great! |
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jun 22, 2022
* testnet-dibbler: v0.32.5 chore: update toolchain and fix clippy (tari-project#4212) feat(wallet_ffi): wallet_get_utxos() (tari-project#4209) chore: bump lmdb-sys dependency (tari-project#4195) chore(deps): upgrade randomx (tari-project#4196) Bump croaring to 0.5.2 - improve cross-compile in docker bug: remove deprecated tauri config variable (tari-project#4194) feat: generate wallet ffi header file automatically (tari-project#4183) v0.32.4 feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jun 22, 2022
* testnet-dibbler: v0.32.5 chore: update toolchain and fix clippy (tari-project#4212) feat(wallet_ffi): wallet_get_utxos() (tari-project#4209) chore: bump lmdb-sys dependency (tari-project#4195) chore(deps): upgrade randomx (tari-project#4196) Bump croaring to 0.5.2 - improve cross-compile in docker bug: remove deprecated tauri config variable (tari-project#4194) feat: generate wallet ffi header file automatically (tari-project#4183) v0.32.4 feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jun 22, 2022
* development: fix clippies remove tari_core_from cbindgen build feat(miner): friendlier miner output (tari-project#4219) v0.32.5 chore: update toolchain and fix clippy (tari-project#4212) feat(wallet_ffi): wallet_get_utxos() (tari-project#4209) chore: bump lmdb-sys dependency (tari-project#4195) chore(deps): upgrade randomx (tari-project#4196) Bump croaring to 0.5.2 - improve cross-compile in docker bug: remove deprecated tauri config variable (tari-project#4194) feat: generate wallet ffi header file automatically (tari-project#4183) v0.32.4 feat(wallet-ffi): adds FFI wallet_get_utxos() and test_wallet_get_utxos() (tari-project#4180)
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.
Description
Adds a
build.rs
andcbindgen
to generate the header file automatically. I was not sure of the best location for this, so kept it the same as the previouswallet.h
file, but renamed the file to match the crate (i.e.tari_wallet_ffi.h
)Motivation and Context
Currently, the
wallet.h
header file was manually edited. This obviously could lead to user error. Most notably, the*_get_timestamp
methods were returningc_longlong
but the header file indicated that they were usingc_ulonglong
. I'm not sure how long it has been like this, or which is correct, so I've changed the method to usec_ulonglong
to match the previous header file.How Has This Been Tested?
Tested locally, but also asked @TruszczynskiA to compile iOs with the new header