Skip to content
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

An out-of-sync uniffi-bindgen tool can create bugs #38

Closed
thunderbiscuit opened this issue Jan 11, 2023 · 1 comment
Closed

An out-of-sync uniffi-bindgen tool can create bugs #38

thunderbiscuit opened this issue Jan 11, 2023 · 1 comment

Comments

@thunderbiscuit
Copy link

thunderbiscuit commented Jan 11, 2023

The uniffi_bindgen_generate.sh script calls the uniffi-bindgen cli tool installed on the user's local machine, but if the tool is out of sync with the rest of the uniffi libraries used in Cargo.toml the bindings produced will often not work.

The long-term solution used by Mozilla and which we adopted in the bdk-ffi repo is to create and maintain within the repo a small cli tool which we call ourselves to generate the bindings file, in effect controlling which version of uniffi_bindgen is used to generate the glue file.

The short-term solution is to just add a note to the readme that specifies which version of the uniffi-bindgen tool developers should have on the local setup before running the uniffi_bindgen_generate.sh script. At the moment this is version 0.21.0, which can be downloaded using

cargo install uniffi_bindgen --version 0.21.0
@thunderbiscuit thunderbiscuit changed the title An out-of-sync uniffibindgen tool can be out of sync and create bugs An out-of-sync uniffibindgen tool can create bugs Jan 11, 2023
@thunderbiscuit thunderbiscuit changed the title An out-of-sync uniffibindgen tool can create bugs An out-of-sync uniffi-bindgen tool can create bugs Jan 11, 2023
@tnull
Copy link
Collaborator

tnull commented Jan 27, 2023

Done, as I now upgraded #25 to UniFFI 0.23.0, which deprecates the standalone uniffi_bindgen (and hence forced me to build it locally).

@tnull tnull closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants