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

Add native binding #784

Closed
wants to merge 6 commits into from
Closed

Conversation

lmoe
Copy link

@lmoe lmoe commented Jul 14, 2023

Description of change

Adds a new binding that can be compiled into a common shared library.
It can be referenced by other languages such as Go/C/C#/etc.

It exports the following functions:

init_logger
binding_get_last_error

call_client_method
call_secret_manager_method
call_utils_method
call_wallet_method

create_client
create_secret_manager
create_wallet
listen_wallet

destroy_client
destroy_secret_manager
destroy_string
destroy_wallet

get_client_from_wallet
get_secret_manager_from_wallet

C/C++ example headers were generated and are to be found at bindings/native/headers.

A Go library example can be found here
The Go library is primarily used for the secret managers, but a basic Wallet implementation exists as well.

A readme was added in bindings/native/README.md to explain string/error handling, but it's not a complete guide.

A CI workflow was added to build the library for linux, mac and windows. A trigger workflow does not exist yet.

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Tests were written in Go and can be found here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually publish anything?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super well versed with those workflows.
I've tested it in a private repo and I made it build and create downloadable artifacts.

Where they should be published to or anything else, I don't know how you want that handled and figured you know it better than I do. :)

If you give me some instructions I might be able to complete the workflow on my own.

@thibault-martinez
Copy link
Member

Can you target the 1.1 branch please 🙏🏻

@wireless90
Copy link

This would be useful for the c# binding. Hope it gets merged soon thanks

@lmoe lmoe changed the base branch from develop to 1.1 September 14, 2023 13:56
@lmoe
Copy link
Author

lmoe commented Sep 14, 2023

@wireless90 Happy to see C# being used!

@thibault-martinez Rebased with 1.1, Go tests currently running locally. Will test it with wasp-cli as well and give you feedback afterwords.

@thibault-martinez thibault-martinez changed the base branch from 1.1 to develop October 2, 2023 07:40
@thibault-martinez
Copy link
Member

Will be reopened in https://github.com/iotaledger/iota-sdk-native-bindings

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

Successfully merging this pull request may close these issues.

3 participants