DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.05k stars 764 forks source link

Tokio version appears to be mising new_multi_thread fresh install with LiveView 0.5.0-alpha.0 #2031

Closed LiamKarlMitchell closed 5 months ago

LiamKarlMitchell commented 5 months ago

Feature Request

Attempting to follow along with guide for dioxus. https://dioxuslabs.com/learn/0.5/getting_started/liveview

I get an error on first build it seems another dependency was needed for Tokio.

cargo build
   Compiling dioxus-liveview v0.5.0-alpha.0
error[E0599]: no function or associated item named `new_multi_thread` found for struct `tokio::runtime::Builder` in the current scope
   --> /home/liam/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dioxus-liveview-0.5.0-alpha.0/src/launch.rs:12:30
    |
12  |     tokio::runtime::Builder::new_multi_thread()
    |                              ^^^^^^^^^^^^^^^^
    |                              |
    |                              function or associated item not found in `Builder`
    |                              help: there is an associated function with a similar name: `new_current_thread`
    |
note: if you're trying to build a new `tokio::runtime::Builder` consider using one of the following associated functions:
      tokio::runtime::Builder::new_current_thread
      tokio::runtime::Builder::new
   --> /home/liam/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/builder.rs:217:5
    |
217 |     pub fn new_current_thread() -> Builder {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
263 |     pub(crate) fn new(kind: Kind, event_interval: u32) -> Builder {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Implement Suggestion

[dependencies]
dioxus = { version = "0.5.0-alpha.0", features = ["liveview", "axum"] }
tokio = { version = "1.36.0", features = ["full"] }
jkelleyrtp commented 5 months ago

Closed by #2073