hyperium / hyperium.github.io

http://hyper.rs
29 stars 68 forks source link

The Example From Getting Started with a Server Give Me An Error: unresolved import `hyper_util::rt::TokioIo` #105

Closed lukisxyz closed 11 months ago

lukisxyz commented 11 months ago

An example how to use hyper on server in this page give me an error: page here's the error message showed to me:

unresolved import `hyper_util::rt::TokioIo`
the item is gated behind the `tokio` feature

This is my cargo.toml:


[package]
name = "repro"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hyper = { version = "1", features = ["full"] }
tokio = { version = "1", features = ["full"] }
http-body-util = "0.1"
hyper-util = { git = "https://github.com/hyperium/hyper-util.git" }