logos-libp2p-module is a Logos module that integrates libp2p networking capabilities (via nim-libp2p C bindings) into the Logos ecosystem.
It provides:
- Peer connectivity
- Stream management
- Kademlia DHT operations
- Mix operaions
- Gossipsub operaions
- Sync and async APIs compatible with Qt
Check the examples/ directory for complete usage demonstrations.
Currently the recommended and supported building way is using Nix
nix buildOr explicitly
nix build '.#default'The result will include:
/lib/libp2p_module_plugin.so(or.dylibon macOS) — The Logos libp2p module plugin/include/libp2p_module_api.h— Generated module API header/include/libp2p_module_api.cpp— Generated module API implementation
Build only the library (plugin)
nix build '.#lib'Build only the generated headers
nix build '.#include'See examples for how to build examples
Enter development environment
nix developThis provides:
- CMake
- Ninja
- Qt6
- Logos SDK dependencies
- Proper environment variables
If flakes are not enabled globally:
nix build --extra-experimental-features 'nix-command flakes'To enable globally, add flake as a experimental-feature to ~/.config/nix/nix.conf:
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf