I have a project that builds fine with cargo build --target=wasm32-unknown-unknown , but it refuses to build IntelliJ, because it does not have target_arch="wasm32" set when buildng from within IntelliJ.
Is there a way, in IntelliJ, to tell it to builds with target_arch="wasm32" ?
The XY problem is: I want this project to build under IntelliJ, so when there are build output errors, I can click on them and jump to correct location in IntelliJ.
If you always need to build it for this target you can create a .cargo/config.toml file and in the [build] section set target to wasm32-unknown-unknown. Be aware that cargo look for .cargo/config.toml in the current dir and parent dirs. So if for example your crate is part of a workspace then .cargo/config.toml will be ignored if it is in the crate dir when running cargo from the workspace root as opposed to the crate dir.