when i run a dioxus project and add tokio in dependence
tokio = { version = "1.37.0", features = ["full"] }
it will show
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
--> /Users/xy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/net/udp.rs:635:20
|
635 | self.inner.deregister(registry)
| ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
|
::: /Users/xy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.11/src/io_source.rs:62:1
|
62 | pub struct IoSource<T> {
| ---------------------- method `deregister` not found for this struct
Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio` (lib) due to 44 previous errors
i tried cargo clean and cargo update but it did not work
This is related to Dioxus #1330, to summarize tokio does not play nicely with WebAssembly. Their incompatability is also discussed here and according to Tokio #1597 they have no plans to make tokio work with WASM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With