You can configuration rust-analyzer link vscode, full configurable regard to https://rust-analyzer.github.io/manual.html#configuration
.vscode/settings.json
{
"rust-analyzer.cargo.target": "wasm32-unknown-unknown"
}
No need any config, simple add configuration to you .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "cargo",
"command": "build",
"args": [
"--package",
"app"
],
"label": "build desktop"
}
]
}