You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to add the WebAssembly I built from Rust by this guide into my Snap. I added the pkg folder into /packages/snap
In my index.tsx, I added import init, { greet, get_hello_world_string } from '../pkg/hello_wasm.js';.
Then I was trying to add await init('../pkg/hello_wasm_bg.wasm'); into onRpcRequest. I did not work and I was given error "failed to fetch" when I click send message in the webpage of localhost:8000.
I also tried await fetch('./hello_wasm_bg.wasm'); and await fetch('../pkg/hello_wasm_bg.wasm'); They were all giving the same error failed to fetch.
I already added "endowment:network-access": {}, "endowment:webassembly": {} into my snap.manifest.json
Can any tell me how can I add my WebAssembly correctly into my Snap?
The text was updated successfully, but these errors were encountered:
Hi, I am trying to add the WebAssembly I built from Rust by this guide into my Snap. I added the pkg folder into /packages/snap
In my index.tsx, I added
import init, { greet, get_hello_world_string } from '../pkg/hello_wasm.js';
.Then I was trying to add
await init('../pkg/hello_wasm_bg.wasm');
intoonRpcRequest
. I did not work and I was given error "failed to fetch" when I click send message in the webpage of localhost:8000.I also tried
await fetch('./hello_wasm_bg.wasm');
andawait fetch('../pkg/hello_wasm_bg.wasm');
They were all giving the same error failed to fetch.I already added
"endowment:network-access": {}, "endowment:webassembly": {}
into my snap.manifest.jsonCan any tell me how can I add my WebAssembly correctly into my Snap?
The text was updated successfully, but these errors were encountered: