mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-02-25 22:55:14 +00:00
Update README.md
This commit is contained in:
parent
8c4c2159ed
commit
4bfb8eb017
41
README.md
41
README.md
@ -3,7 +3,46 @@
|
|||||||
[](https://travis-ci.org/status-im/nim-libp2p)
|
[](https://travis-ci.org/status-im/nim-libp2p)
|
||||||
[](https://ci.appveyor.com/project/nimbus/nim-libp2p/branch/master)
|
[](https://ci.appveyor.com/project/nimbus/nim-libp2p/branch/master)
|
||||||
|
|
||||||
libp2p implementation in Nim
|
## Introduction
|
||||||
|
|
||||||
|
An implementation of [libp2p](https://libp2p.io/) in Nim, as a wrapper of the [Libp2p Go daemon](https://github.com/libp2p/go-libp2p).
|
||||||
|
|
||||||
|
Note that you need Go 1.12+ for the below instructions to work!
|
||||||
|
|
||||||
|
Install dependencies and run tests with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./example/chat
|
||||||
|
/connect QmbmHfVvouKammmQDJck4hz33WvVktNEe7pasxz2HgseRu
|
||||||
|
```
|
||||||
|
|
||||||
|
You can now chat between the instances!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Coming soon...
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user