I'm trying to get WebAssembly's polyfill-prototype-1 running:
I have a localhost running a .html file with only the basics ( ) and a call to loadWebAssembly() as specified in https://github.com/WebAssembly/polyfill-prototype-1/blob/master/README.md.
However, when I go to the page I get the error: "http://localhost/-username-/polyfill-prototype-1/undefined 404 (Not Found)" because packedURL in load-wasm.js is undefined, which as seen in the afore-cited link, seems to mean that step 2 in "How it (currently) works" (i.e. "The polyfill library starts up a worker containing asm.js code compiled from unpack.cpp concatenated with the glue code in load-wasm-worker.js.") Isn't being called/run/something
I've speculated that I'm not giving it the path to the code to convert or something, but I don't know how to do so.
What am I doing wrong/how do I get it to turn my c++ code into asm.js so it can continue to step 3?
Following this article for this GitHub repo running locally in c:\Inetpub\wwwroot\WASM\Index.html, in IIS I converted the directory to an application and get a 404 Not Found for squarer.wasm when browsing to http://localhost/WASM/Index.html
The error is shown in the Browser Developer Tools console:
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(Fetch)GET - http://localhost/wasm/squarer.wasm
To get rid of the 404 add a new Mime Type for Wasm, it's not currently in IIS 10 (or below).
Click Start > Run > type InetMgr > expand Sites > select the app > Mime Types > Add:
Extension: .wasm (dot wasm)
MIMEType: application/wasm
Ref: https://github.com/webpack/webpack-dev-middleware/issues/229
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With