-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples/ping build errors #3112
Comments
Could you give a bit more context here? What exactly is the issue and could you give the complete code? From the first look of it you copy-and-pastet the ping example into a project of your own, but you forgot to enable the necessary features of libp2p and add the libp2p_swarm dependency. |
I agree with @umgefahren, Although the errors dont provide much context, it only make me assume you didnt have all of the dependencies apart of your project as well as having the features enabled in your |
Related: #3111 |
Sorry, I'm new to Rust. Problem solved. |
No problem Part of the problem might be the fact that the ping example uses libp2p_swarm instead of libp2p. |
error[E0432]: unresolved import
libp2p::ping
--> src/main.rs:26:24
|
26 | use libp2p::{identity, ping, Multiaddr, PeerId};
| ^^^^ no
ping
in the rooterror[E0432]: unresolved import
libp2p_swarm
--> src/main.rs:27:5
|
27 | use libp2p_swarm::keep_alive;
| ^^^^^^^^^^^^ use of undeclared crate or module
libp2p_swarm
error[E0433]: failed to resolve: use of undeclared crate or module
async_std
--> src/main.rs:30:3
|
30 | #[async_std::main]
| ^^^^^^^^^ use of undeclared crate or module
async_std
error[E0425]: cannot find function
development_transport
in cratelibp2p
--> src/main.rs:36:29
|
36 | let transport = libp2p::development_transport(local_key).await?;
| ^^^^^^^^^^^^^^^^^^^^^ not found in
libp2p
error[E0599]: no method named
select_next_some
found for structSwarm
in the current scope--> src/main.rs:53:21
|
53 | match swarm.select_next_some().await {
| ^^^^^^^^^^^^^^^^ method not found in
Swarm<Behaviour>
The text was updated successfully, but these errors were encountered: