c-lean-libp2p is a C11 implementation of the minimal Libp2p components needed for Lean (post-quantum) Ethereum.
Dependencies are vendored as git submodules:
external/aws-lcexternal/ngtcp2external/secp256k1
After cloning, initialize them with:
git submodule update --init --recursivecmake -S . -B build
cmake --build build --parallelThe main target is the static library:
c_lean_libp2p
Tests are enabled by default. To build only the library:
cmake -S . -B build -DBUILD_TESTING=OFF
cmake --build build --parallelctest --test-dir build --output-on-failureThe test suite includes unit tests and spec-oriented tests for multiformats, peer IDs, QUIC transport behavior, and QUIC TLS identity vectors.
Useful local checks:
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --parallel
ctest --test-dir build --output-on-failureThe CI suite also runs sanitizer builds, static analysis, 32-bit builds, Windows builds, and MISRA C analysis for project headers and sources.