cawfree / react-native-webassembly

⚛️ 🏎 WebAssembly for React Native powered by JSI.
https://twitter.com/cawfree
MIT License
291 stars 6 forks source link

Provide Example With Local .wasm File #4

Closed skyworms closed 1 year ago

skyworms commented 1 year ago

Would it be possible to provide an example using a local .wasm file instead of retrieving one with axios? I'm having trouble setting up a test project with a local .wasm file and was wondering if it's possible or if axios is actually necessary.

cawfree commented 1 year ago

This is a good idea, I'll add an example for this. 🙏

cawfree commented 1 year ago

Hey @skyworms!

I've released the ability to import local WebAssembly files as part of Release 0.2.5, so you'll need to update to the latest version of react-native-webassembly. The included example in the repository now shows how to configure a target project to enable local file resolution; check out this commit for a comprehensive example.

Apologies for the turnaround time, hope this didn't block you too badly.

Good luck! If you encounter any issues, please let me know!

skyworms commented 1 year ago

It works! Thank you so much!