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

Account for [AllowShared] and improve interface attribute generated setters #4156

Merged
merged 11 commits into from
Oct 9, 2024

Conversation

daxpedda
Copy link
Collaborator

@daxpedda daxpedda commented Oct 9, 2024

  • Any function that takes a buffer view type and is not marked with [AllowShared] now returns a Result. Only applies to new APIs to avoid breaking changes.
  • Buffer view types aren't only translated into Rust slices (e.g. &[u8]), but now additional bindings are generated for JS types (e.g. Uint8Array).
  • Setters generated from interface attributes with multiple possible types now properly generate bindings for each type instead of just JsValue. This applies to buffer view types as well. Old setters are deprecated.

Fixes #3772.

@daxpedda daxpedda marked this pull request as ready for review October 9, 2024 18:51
@daxpedda daxpedda merged commit 95bf437 into rustwasm:main Oct 9, 2024
41 checks passed
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.

Mark functions incompatible with SharedArrayBuffer and provide alternative signatures
1 participant