libp2p implementation in Nim
https://status-im.github.io/nim-libp2p/docs/
9862064234 | ||
---|---|---|
examples | ||
libp2p | ||
tests | ||
.appveyor.yml | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
LICENSE-APACHEv2 | ||
LICENSE-MIT | ||
README.md | ||
libp2p.nim | ||
libp2p.nimble |
README.md
nim-libp2p
Introduction
An implementation of libp2p in Nim, as a wrapper of the Libp2p Go daemon.
Note that you need Go 1.12+ for the below instructions to work!
Install dependencies and run tests with:
git clone https://github.com/status-im/nim-libp2p && cd nim-libp2p
nimble install
nimble test
git submodule update --init --recursive
go version
git clone https://github.com/libp2p/go-libp2p-daemon
cd go-libp2p-daemon
git checkout v0.0.1
go install ./...
cd ..
Try out the chat example:
nim c -r --threads:on examples\chat.nim
This will output a peer ID such as QmbmHfVvouKammmQDJck4hz33WvVktNEe7pasxz2HgseRu
which you can use in another instance to connect to it.
./example/chat
/connect QmbmHfVvouKammmQDJck4hz33WvVktNEe7pasxz2HgseRu
You can now chat between the instances!
API
Coming soon...
License
Licensed and distributed under either of
- MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, (LICENSE-APACHEv2 or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This file may not be copied, modified, or distributed except according to those terms.