I'm generating asm.js from a Rust file like so:
rustc demo.rs --target asmjs-unknown-emscripten -C opt-level=0 -C link-arg="-s MINIMAL_RUNTIME=1" -C link-arg="-s ENVIRONMENT=web" -C link-arg="-s LEGACY_VM_SUPPORT=1" -o ../../build/bytecode/demo.asm.js
However, when I look through the generated asm.js file, I can clearly see that those compiler options were not passed through - the code still assumes it can be run in any environment, and the legacy VM polyfills are missing.
What am I missing?
This is the rust file, in case that matters:
#[allow(dead_code)]
pub fn my_add(num1: f64, num2: f64) -> f64 {
return num1 + num2;
}
pub fn main() {
println!("Rust loaded");
}