Rust-Analyzer seems to break incremental compilation in Debug mode (e.g., when using `dioxus serve`)
Hi,
Rust-Analyzer seems to break incremental compilation in Debug mode, when the target is Wasm (see https://github.com/rust-lang/rust-analyzer/issues/12551).
A workaround is, to create and use a separate build profile, e.g. by adding the following to the Cargo.toml of the project:
[profile.dev2]
inherits = "dev"
...and then execute dioxus serve --profile dev2.
Without that, I had to wait 30 to 60 seconds after basically every change (with a separate profile it takes ~800 ms).
I think, until the above issue is fixed, the workaround should be added to the hot-reload section of the guide.
There seems to be currently a bug, which result in the above not working properly (see https://github.com/DioxusLabs/cli/issues/91)
I have found a workaround for https://github.com/DioxusLabs/cli/issues/91:
Instead of switching Dioxus to a different profile, I switched Rust-Analyzer to another profile.
I've described how to do that in the following comment: https://github.com/rust-lang/rust-analyzer/issues/6007#issuecomment-1379342831