Open nuxlli opened 7 years ago
Are you doing the wargo-loader
example with Webpack? Do you think you could post the output of running wargo test
in your project?
Yes, I was testing the wargo-loader
.
Shows the results for the wargo test
:
▶ wargo test
Setup wasm checking dependencies...
Setup wasm found emsdk installation in ~/.emsdk
Setup wasm setting environment...
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.22
clang version 4.0.0 (emscripten 1.37.22 : 1.37.22)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Users/nuxlli/.emsdk/clang/e1.37.22_64bit
INFO:root:(Emscripten: Running sanity checks)
Setup wasm running 'cargo test --target=wasm32-unknown-emscripten --no-run'
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Setup wasm running 'cargo test --target=wasm32-unknown-emscripten --no-run --message-format=json'
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Setup wasm running tests...
wasm streaming compile failed: TypeError: Incorrect response MIME type. Expected 'application/wasm'.
falling back to ArrayBuffer instantiation
pre-main prep time: 895 ms
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Have you found any solution yet? The same problem happened in my browser.
I could also reproduce this issue on macOS 10.13. It appears to be darwin
specific, as I could get it running if I compiled on Linux. I'm not sure if this is an issue specific to wargo
or the Rust compiler itself.
It is happening for me on the mac as well
The error seems to be the wasm instantiation failing
function instantiateArrayBuffer(receiver) {
getBinaryPromise().then(function(binary) {
return WebAssembly.instantiate(binary, info);
}).then(receiver).catch(function(reason) {
Module['printErr']('failed to asynchronously prepare wasm: ' + reason);
abort(reason);
});
}
If anyone wants to jump on a call and troubleshoot I can demo the issue (I personally don't really know rust or webpack)
I followed all the steps of the article https://lord.io/blog/2017/wargo/ However I'm getting the following errors when I try to access the http://127.0.0.1:8080: