Registry / networking / libp2p-swarm

libp2p-swarm

JSON →
library0.47.1rscratesunverified

The libp2p swarm for managing peer-to-peer network connections.

# Cargo.toml [dependencies] libp2p-swarm = "0.47.1"
INSTALL
IMPORT
SIG · LIBP2P-SWARM
L
libp2p-swarm
networkingrustv0.47.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Swarm
use libp2p_swarm::Swarm;

Create a new libp2p swarm with an identity keypair.

use libp2p_swarm::Swarm; use libp2p::identity::Keypair; let keypair = Keypair::generate_ed25519(); let swarm = Swarm::new(keypair);
Debug
Known issues
gotchaRequires tokio runtime and multiple feature flags for transports
fix
Add `tokio` and enable features like `tcp`, `dns`, `noise` in `libp2p`
affects: >=0.47
Upgrade
Version history
0.47.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
libp2p-swarm — cargo add libp2p-swarm · libregistry