48 lines
1.0 KiB
Markdown
Raw Normal View History

2026-05-04 01:30:25 +02:00
# libp2p Mix Example
Standalone Nim example for running a libp2p Mix protocol ping simulation.
## Quick Start
Prerequisites:
- Nim 2.0 or newer
- Nimble
- Git
From a fresh clone:
```bash
nimble setup -l
nim c -r mix_ping.nim
```
`nimble setup -l` enables project-local dependency mode, installs dependencies
under `nimbledeps/`, and generates `nimble.paths` and `nimble.develop`.
## Local Files
The repository uses `config.nims` to keep Nim build output in the local
`nimcache/` directory and to include `nimble.paths` when it exists.
These files and directories are local artifacts and should not be committed:
- `nimbledeps/`
- `nimble.paths`
- `nimble.develop`
- `nimcache/`
- `mix_ping`
## Clean Rebuild
To verify the project can be rebuilt from committed files:
```bash
rm -rf nimbledeps nimble.paths nimble.develop nimcache mix_ping
nimble setup -l
nim c -r mix_ping.nim
```
If `nimble setup -l` reports that it cannot determine the VCS revision, make at
least one Git commit first, then rerun the command.