-
Notifications
You must be signed in to change notification settings - Fork 787
Ability to list each item on Exports/Data Segments/Functions #2386
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
Conversation
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.
Small comments inline. Please also add tests in test/binaryen.js/kitchen-sink.js and test/example/c-api-kitchen-sink.c.
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.
Looks great! Just one last readability comment on the tests and I think we're good to go.
Sorry, I noticed a few more C++ issues. This is the last of it for real now 👍 |
While creating the respective bindings for AssemblyScript, I noticed that there is int64_t BinaryenGetMemorySegmentByteOffset(BinaryenModuleRef module,
BinaryenIndex id) { returning an |
@dcodeIO The returned value will contain the lower 32 bits, though, so it should just work for you (with wasm32 for sure). |
This is fixed by #2432. |
Thanks! 🎉 Being so cautious here because |
It gives the possibility to list several contents in a decoded module.
Some examples of the use of the JS api: