Skip to content

web: Migrate WASM initialization to use module_or_path parameter #20084

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

ukuq
Copy link

@ukuq ukuq commented Apr 13, 2025

The legacy WASM initialization API now triggers a console warning:

"using deprecated parameters for the initialization function; pass a single object instead"

So migrate to the new one

// Before (deprecated):
wasm_bindgen(your_array_buffer); 

// After (recommended):
wasm_bindgen({ module_or_path: your_array_buffer });

@kjarosh kjarosh added A-web Area: Web & Extensions T-fix Type: Bug fix (in something that's supposed to work already) labels Apr 14, 2025
@torokati44
Copy link
Member

This seems legit, thank you!
rustwasm/wasm-bindgen#3995 (comment)

I just don't like the PR title / commit message.
The change itself LGTM, but please squash on merge, with a proper (tagged and capitalized) commit message!

@ukuq ukuq changed the title web: fix wasm warn message web: Migrate WASM initialization to use module_or_path parameter Apr 15, 2025
@ukuq
Copy link
Author

ukuq commented Apr 15, 2025

This seems legit, thank you! rustwasm/wasm-bindgen#3995 (comment)

I just don't like the PR title / commit message. The change itself LGTM, but please squash on merge, with a proper (tagged and capitalized) commit message!

I'm new to this. Thanks for your guidance

@ukuq ukuq reopened this Apr 15, 2025
@danielhjacobs danielhjacobs merged commit e01842f into ruffle-rs:master Apr 15, 2025
29 of 31 checks passed
@danielhjacobs
Copy link
Contributor

danielhjacobs commented Apr 15, 2025

I'm new to this.

You're also going to have some issues if you try to pull into your master branch the current content of the upstream master branch, which you'll want to do if you want to make another change in the future. For future reference, it will make things significantly easier for you in the long run to create a new branch on your fork using the master branch as a base and make a pull request using that branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web Area: Web & Extensions T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants