Simple install results in failing compilation
njgheorghita opened this issue · 2 comments
njgheorghita commented
Following the install instructions, simply adding a single dependency discv5 = "0.1.0-beta.3"
or discv5 = { version = "0.1.0-beta.3", features = ["libp2p"] }
in Cargo.toml
results in failing compilation.
error[E0425]: cannot find function `spawn` in module `tokio::task`
--> /Users/~/.cargo/registry/src/github.com-1ecc6299db9ec823/discv5-0.1.0-beta.3/src/executor.rs:34:22
|
34 | tokio::task::spawn(future);
| ^^^^^ not found in `tokio::task`
|
help: consider importing one of these items
|
2 | use crate::kbucket::arrayvec::io::sys::ext::net::sys_common::util::thread::spawn;
|
2 | use std::thread::spawn;
|
Adding an explicit dependency on tokio = { version = "1", features = ["full"] }
fixes the failing compilation. I'm fairly new to the rust world, so it's hard for me to say if this is expected or not, but if so it might be worth adding to the docs.
AgeManning commented
Yep thanks for raising this.
Some of tests I'm using pass their own executor into the library. I'll add the tokio feature into the repository
AgeManning commented
I think this should be resolved in the latest version. Please re-open if thats not the case.