Skip to content

Commit bd49632

Browse files
authored
docs: add getting started section to examples README
Pull-Request: #5934.
1 parent 144be1f commit bd49632

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

examples/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ A set of examples showcasing how to use rust-libp2p.
44

55
## Getting started
66

7+
To run any example in this directory, you can use Cargo:
8+
9+
```sh
10+
# Navigate to the specific example directory
11+
cd examples/ping
12+
13+
# Run the example
14+
cargo run
15+
```
16+
17+
Each example includes its own README.md file with specific instructions on how to use it. Most examples require running multiple instances to demonstrate peer-to-peer communication, so be sure to read the individual example documentation.
18+
19+
### Prerequisites
20+
21+
- Rust and Cargo installed (see [rustup.rs](https://rustup.rs/) for installation)
22+
- Basic understanding of peer-to-peer networking concepts
23+
- Some examples may require additional dependencies specific to their functionality
724

825
## Individual libp2p features
926

0 commit comments

Comments
 (0)