DioxusLabs / DioxusLabs/dioxus

Lint tokio error or update tokio compilation error message

Open
#1,571 8 comments 2 reactions 0 assignees View on GitHub
cli tweak web
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

## 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:
```rust
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.