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

Optional arguments in JS embind bindings #87

Open
axelboc opened this issue Oct 1, 2024 · 0 comments
Open

Optional arguments in JS embind bindings #87

axelboc opened this issue Oct 1, 2024 · 0 comments

Comments

@axelboc
Copy link
Collaborator

axelboc commented Oct 1, 2024

Just to report that Emscripten 3.1.68 makes optional arguments in JS bindings actually optional: emscripten-core/emscripten#22389

I discovered this issue when trying to use the new Module#open method signature with two optional arguments. Just calling open(filename) was throwing a BindingError saying that I was passing the wrong number of arguments. I had to pass undefined explicitly for the two optional arguments: https://github.com/silx-kit/h5web/blob/main/packages/h5wasm/src/worker.ts#L26

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

1 participant