Currently when doing cargo run --target=asmjs-unknown-emscripten or cargo test --target=asmjs-unknown-emscripten you get the following error:
error: could not execute process `target/asmjs-unknown-emscripten/debug/foobar.js` (never executed)
While the asmjs backend is mostly meant to be used on the Web it would be quite useful to have the targets compiled for the asmjs to be launched through Node.js, if nothing else for running tests.
There is, of course, a partial workaround for Linux where you could technically do this:
echo ":js:E::js::/usr/bin/node:" | sudo tee /proc/sys/fs/binfmt_misc/register
and the OS would take care of launching the files through Node.js; this, however, doesn't work currently as Cargo doesn't set the executable bits on the .js files it produces.
Currently when doing
cargo run --target=asmjs-unknown-emscriptenorcargo test --target=asmjs-unknown-emscriptenyou get the following error:While the asmjs backend is mostly meant to be used on the Web it would be quite useful to have the targets compiled for the asmjs to be launched through Node.js, if nothing else for running tests.
There is, of course, a partial workaround for Linux where you could technically do this:
and the OS would take care of launching the files through Node.js; this, however, doesn't work currently as Cargo doesn't set the executable bits on the
.jsfiles it produces.