|
1 | 1 | # Table of Contents
|
2 | 2 | - [Introduction](#introduction)
|
| 3 | +- [Prerequisites](#prerequisites) |
3 | 4 | - [Installation](#installation)
|
| 5 | + - [Script](#script) |
4 | 6 | - [Usage](#usage)
|
5 | 7 | - [Example](#example)
|
6 | 8 | - [Getting Started](#getting-started)
|
7 | 9 |
|
8 | 10 | # Introduction
|
9 | 11 | This is a libp2p-backed daemon wrapping the functionalities of go-libp2p for use in Nim. <br>
|
10 | 12 | For more information about the go daemon, check out [this repository](https://github.com/libp2p/go-libp2p-daemon).
|
| 13 | +> **Required only** for running the tests. |
| 14 | +
|
| 15 | +# Prerequisites |
| 16 | +Go with version `1.15.15`. |
| 17 | +> You will *likely* be able to build `go-libp2p-daemon` with different Go versions, but **they haven't been tested**. |
11 | 18 |
|
12 | 19 | # Installation
|
| 20 | +Follow one of the methods below: |
| 21 | + |
| 22 | +## Script |
| 23 | +Run the build script while having the `go` command pointing to the correct Go version. |
| 24 | +We recommend using `1.15.15`, as previously stated. |
| 25 | +```sh |
| 26 | +./scripts/build_p2pd.sh |
| 27 | +``` |
| 28 | +If everything goes correctly, the binary (`p2pd`) should be built and placed in the correct directory. |
| 29 | +If you find any issues, please head into our discord and ask for our asistance. |
| 30 | + |
| 31 | +After successfully building the binary, remember to add it to your path so it can be found. You can do that by running: |
13 | 32 | ```sh
|
14 |
| -# clone and install dependencies |
15 |
| -git clone https://github.com/status-im/nim-libp2p |
16 |
| -cd nim-libp2p |
17 |
| -nimble install |
18 |
| - |
19 |
| -# perform unit tests |
20 |
| -nimble test |
21 |
| - |
22 |
| -# update the git submodule to install the go daemon |
23 |
| -git submodule update --init --recursive |
24 |
| -go version |
25 |
| -git clone https://github.com/libp2p/go-libp2p-daemon |
26 |
| -cd go-libp2p-daemon |
27 |
| -git checkout v0.0.1 |
28 |
| -go install ./... |
29 |
| -cd .. |
| 33 | +export PATH="$PATH:$HOME/go/bin" |
30 | 34 | ```
|
| 35 | +> **Tip:** To make this change permanent, add the command above to your `.bashrc` file. |
31 | 36 |
|
32 | 37 | # Usage
|
33 | 38 |
|
|
0 commit comments