Skip to content

logos-co/logos-libp2p-module

Repository files navigation

logos-libp2p-module

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.


Building

Currently the recommended and supported building way is using Nix

Build everything (default)

nix build

Or explicitly

nix build '.#default'

The result will include:

  • /lib/libp2p_module_plugin.so (or .dylib on 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 Individual Components

Build only the library (plugin)

nix build '.#lib'

Build only the generated headers

nix build '.#include'

See examples for how to build examples

Development Shell

Enter development environment

nix develop

This 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

About

logos-libp2p-module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors