raphamorim / wasm-and-rust

WebAssembly and Rust: A Web Love Story
498 stars 29 forks source link

Problems loading js #2

Closed samghelms closed 6 years ago

samghelms commented 6 years ago

Heads up - for some reason, the site.js file set all of the wasm link names to things like 'wasm_demo.{asm.js,.wasm}' instead of the 'site.wasm' needed to actually load the files. This meant the demo didn't work for me until I changed these names.

blogscot commented 6 years ago

Hi @samghelms, I originally came across this example in hoverbear's blogpost here. Hoverbear explains in his (I presume he's a dude) blogpost:

Next we need to set up some way to get the generated files from the target/ folder into the site/ folder. make is a good solution for this, so let’s make a Makefile.

This makefile moves and renames the ".wasm" and ".asm.js" to site.wasm and site.js respectively.

Could this explain your problem? 🤔

raphamorim commented 6 years ago

Fixed in #6