I managed to put together and run a hello world program Web Assembly, using Windows Subsystem for Linux (Ubuntu). Essentially following the getting started page found here: https://webassembly.org/getting-started/developers-guide/
I successfully ran the program with this command:
emrun --browser "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe" --verbose --port 8081 hello.html
All is well and dandy when I run this in the command line, but when i made a script called start.sh that looks like this:
#!/usr/bin/env bash
echo "Starting hello world in chrome."
emrun --browser "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe" --verbose --port 8081 hello.html
I get the error mentioned in the title "emrun: commnand not found".
The first line "#!/usr/bin/env bash" was copied from one of the .sh files in the Wasm SDK, so I think its right? Ive also tried adding the Wasm SDK to the $PATH using the edit enviromnent variables manager windows 10 provides, but with no luck.
I dont have a lot of experience with batch scripts, and im not sure how to proceed from here.. I feel like im missing something obvious but I just cant figure out what the difference is between the console and the script file ?
Thanks for taking the time to read this.