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

documentation: updating wasm-web bindings example #1951

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

l4rot
Copy link

@l4rot l4rot commented Mar 13, 2023

Description of change

I noticed that the readme for the wasm-web bindings directory was off and updated it accordingly.

Links to any relevant issues

Be sure to reference any related issues by adding fixes #issue_number.

Type of change

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

  • Documentation Fix

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • [ x] I have made corresponding changes to the documentation

Copy link
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, but I think the example import looks better and we should rather change the library to work like that, what do you think?
To fix it, one probably only needs to add \nexport default init; here

fs.writeFileSync(indexFile, "// @ts-ignore\nexport { init } from '../wasm/iota_wallet_wasm';", { flag: 'a' });

@thibault-martinez
Copy link
Member

Hi @l4rot, we have moved to the https://github.com/iotaledger/iota-sdk repository. Please comment on Thoralf's answer and let us know what you think or reopen it on the SDK. In absence of response, we will close this PR in a week.

@l4rot
Copy link
Author

l4rot commented Mar 31, 2023

Thanks for the PR, but I think the example import looks better and we should rather change the library to work like that, what do you think? To fix it, one probably only needs to add \nexport default init; here

fs.writeFileSync(indexFile, "// @ts-ignore\nexport { init } from '../wasm/iota_wallet_wasm';", { flag: 'a' });

Thank you for your patience!
Sounds good to me, I was just fighting with that issue for some hours until I looked up the other libs and figured it out through their approaches (identity wasm and client wasm).
I thought this would be easier on new devs that try make their way into the iota ecosystem since it was a little bit confusing to me.

Maybe another option would be to standardize the examples for the wasm implementations?

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