Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

LibP2P Example with vcpkg

This example demonstrates how to build and run a simple LibP2P application using vcpkg as the package manager.

Prerequisites

  • CMake 3.15 or higher
  • A C++20 compatible compiler
  • Git
  • vcpkg

Getting Started

  1. Clone vcpkg if you haven't already:
git clone https://github.com/microsoft/vcpkg.git

./vcpkg/bootstrap-vcpkg.sh # For Linux/macOS
.\vcpkg\bootstrap-vcpkg.bat # For Windows
  1. Clone this repository:
git clone https://github.com/libp2p/libp2p.git
cd libp2p/example/00-vcpkg-install
  1. Install LibP2P dependencies using vcpkg:
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake
cmake --build build
  1. Run the example:
./build/example

Notes

  • This example assumes you have a working vcpkg installation. If you encounter any issues, please refer to the vcpkg documentation for troubleshooting.
  • The example demonstrates how to build and run a simple LibP2P application using vcpkg as the package manager.