-
Notifications
You must be signed in to change notification settings - Fork 3
feat: generate Go bindings #78
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a9f1fe4
feat: generate Go bindings
thibault-martinez e2418a5
Merge branch 'sdk-bindings' into go-bindings
thibault-martinez 1d94d0a
update bindings
thibault-martinez ce48bd6
working test
thibault-martinez 8d409d3
fix some things
thibault-martinez e7f5fd7
nits
thibault-martinez d9affd7
Merge branch 'sdk-bindings' into go-bindings
thibault-martinez c3486ac
update bindings
thibault-martinez 05f1550
Merge branch 'sdk-bindings' into go-bindings
thibault-martinez ce7aadc
update go bindings
thibault-martinez 97db78c
fix duplicate symbol
thibault-martinez 03cdced
correct way of checking errors
thibault-martinez 384d85f
Merge branch 'sdk-bindings' into go-bindings
thibault-martinez 0f3ab57
readme
thibault-martinez 944e412
Update bindings/go/README.md
thibault-martinez 099d2ab
update readme and bindings
thibault-martinez 1ca5a43
Merge branch 'sdk-bindings' into go-bindings
thibault-martinez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # IOTA SDK - Go Bindings | ||
|
|
||
| # Install `uniffi-bindgen-go` | ||
|
|
||
| https://github.com/NordSecurity/uniffi-bindgen-go | ||
|
|
||
| `cargo install uniffi-bindgen-go --git https://github.com/filament-dm/uniffi-bindgen-go --rev ab7315502bd6b979207fdae854e87d531ee8764d` until https://github.com/NordSecurity/uniffi-bindgen-go/pull/77 is merged | ||
|
|
||
| # Compile the FFI crate to a dynamic library | ||
|
|
||
| ```sh | ||
| cargo build --all-features -p iota-sdk-ffi --lib --release | ||
| ``` | ||
|
|
||
| # Generate the Go bindings | ||
|
|
||
| ## MacOS | ||
|
|
||
| ```sh | ||
| uniffi-bindgen-go --library target/release/libiota_sdk_ffi.dylib --out-dir ./bindings/go --no-format | ||
Thoralf-M marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## Linux | ||
|
|
||
| ```sh | ||
| uniffi-bindgen-go --library target/release/libiota_sdk_ffi.so --out-dir ./bindings/go --no-format | ||
| ``` | ||
|
|
||
| ## Windows | ||
|
|
||
| ```sh | ||
| uniffi-bindgen-go --library target/release/libiota_sdk_ffi.dll --out-dir ./bindings/go --no-format | ||
| ``` | ||
|
|
||
| # Test it | ||
|
|
||
| ```sh | ||
| LD_LIBRARY_PATH="../../target/release" CGO_LDFLAGS="-liota_sdk_ffi -L../../target/release" go run test.go | ||
| ``` | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| module example.com/bindings | ||
|
|
||
| go 1.24.6 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.