Skip to content

Lint tokio error or update tokio compilation error message #1571

Open
@ealmloff

Description

@ealmloff

Specific Demand

It is very common for people to try to use Tokio in Dioxus (or wasm more generally). If you try to compile the project after adding tokio, you get this crypic error message:

unresolved import `crate::sys::IoSourceState`
   |
12 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

Implement Suggestion

We should either change Tokio's error message when too many Tokio features are enabled for wasm support or look for the Tokio dependency when we compile a project in the CLI and warn users about Tokio not fully supporting wasm

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the dioxus-cli programtweakSmall changes to improve experiencewebrelating to the web renderer for dioxus

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions