You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo builderror[E0433]: failed to resolve: use of undeclared crate or module `tokio` --> src\main.rs:6:3 |6 | #[tokio::main] | ^^^^^ use of undeclared crate or module `tokio`error[E0752]: `main` function is not allowed to be `async` --> src\main.rs:7:1 |7 | async fn main() { | ^^^^^^^^^^^^^^^ `main` function is not allowed to be `async`
Adding a cargo add tokio --features macros,rt-multi-thread fixes this, but I had to figure it out myself, and I'm still not 100% that that runtime feature is what I'm supposed to be using here.
Adding something about this into the documentation to help guide new users would be great.
The text was updated successfully, but these errors were encountered:
Bug Report
https://docs.rs/axum/latest/axum/ has a "Hello world", but if you try it, by default it doesn't work.
Version
0.6.2
Platform
Description
Adding a
cargo add tokio --features macros,rt-multi-thread
fixes this, but I had to figure it out myself, and I'm still not 100% that that runtime feature is what I'm supposed to be using here.Adding something about this into the documentation to help guide new users would be great.
The text was updated successfully, but these errors were encountered: