Skip to content

Suggest adding wasm32-unknown-unknown to cargo config on Linux #1796

@ealmloff

Description

@ealmloff

Discussed in #947

Originally posted by pickfire April 9, 2023
I noticed if I did not specify wasm32-unknown-unknown and I use dioxus serve --hot-reload with rust-analyzer running in the terminal, it needs a full build every time and the incremental build is very slow.

But if I add the wasm target to cargo config in .cargo/config, then it became very fast even on non-rsx changes (from ~48s to ~2.5s). Maybe because there are some issues with caching for rust-analyzer?

[build]
target = "wasm32-unknown-unknown"

Maybe we can suggest adding that to https://dioxuslabs.com/docs/0.3/guide/en/getting_started/hot_reload.html if web is used?

This issue does not effect windows or mac, but there have been other reports of the same issue on discord about hot reloading doing a full rebuild on linux with rust analyzer

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the dioxus-cli programdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions