2026-05-04 05:09:08 +02:00

1.0 KiB

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:

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:

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.