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

Submit Issue to react-native about WebAssembly #2

Open
martinheidegger opened this issue Oct 5, 2020 · 7 comments
Open

Submit Issue to react-native about WebAssembly #2

martinheidegger opened this issue Oct 5, 2020 · 7 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@martinheidegger
Copy link
Member

There is a fix in the test setup for broken/missing WebAssembly support in the react-native for iOS system:

// iOS defines a WebAssembly global, but doesn't provide a way to create instances
// We shold delete the WebAssembly global in that case so that the tests pass
if (typeof WebAssembly !== 'undefined' && global.WebAssembly) {
const canMakeInstance = global.WebAssembly.Instance || global.WebAssembly.instantiate
if (canMakeInstance) {
global.WebAssembly = undefined
}
}
- This should be reported to react-native with the hopes to make it unnecessary to have that fix in future.

@RangerMauve
Copy link
Collaborator

Looking into this now

@RangerMauve
Copy link
Collaborator

I think there's a bug in my logic actually. 🙃

@RangerMauve
Copy link
Collaborator

Working on making a minimal test case to submit in the RN github issue.

I have a hypothesis that maybe WASM is actually supported but there's something weird when loading? 🤔

@RangerMauve
Copy link
Collaborator

@RangerMauve RangerMauve added the wontfix This will not be worked on label Oct 16, 2020
@RangerMauve
Copy link
Collaborator

BLocked by faceboook for now, but we have a workaround

@martinheidegger
Copy link
Member Author

Even if facebook reacts on this it will take ~ half-a-year until this may work. Is it possible in a react-native setup to just set global.WebAssembly = undefined?

@RangerMauve
Copy link
Collaborator

@martinheidegger Yes, I've done it in the shim.js file within the hypercore-rn repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants