You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will produce an executable in the `./target/release` directory.
22
22
23
+
##Setup
24
+
25
+
###Using Docker
26
+
27
+
CodeChain supports the use of Docker to provide an easy and seamless installation process by providing a single package that gives the user everything he/she
28
+
needs to get CodeChain up and running. In order to get the installation package, run the following command after installing Docker:
WSL users may find difficulty in using Docker, and thus, it is highly recommended to use Ubuntu, or install Docker for Windows. When using Docker for Windows,
35
+
it is necessary to enable Hyper-V in BIOS settings.
36
+
37
+
To see the Docker images created, run the following:
38
+
```sh
39
+
docker images
40
+
```
41
+
42
+
It will result in something like this:
43
+
```sh
44
+
REPOSITORY TAG IMAGE ID CREATED SIZE
45
+
codechain-io/codechain branch_or_tag_name 6f8474d9bc7a About a minute ago 1.85GB
46
+
ubuntu 14.04 971bb384a50a 6 days ago 188MB
47
+
```
48
+
49
+
If you want to run the first image file, run the following command:
50
+
```sh
51
+
docker run -it codechain-io/codechain:branch_or_tag_name
52
+
```
53
+
54
+
This should result in CodeChain running.
55
+
56
+
###Building From Source
57
+
58
+
####Build Dependencies
59
+
CodeChain requires Rust version 1.32.0 to build. Using [rustup](https://rustup.rs/"rustup URL") is recommended.
60
+
61
+
- For Linux Systems:
62
+
- Ubuntu
63
+
64
+
> `gcc`, `g++` and `make` are required for installing packages.
65
+
```sh
66
+
$ curl https://sh.rustup.rs -sSf | sh
67
+
```
68
+
69
+
70
+
- For Mac Systems:
71
+
- MacOS 10.13.2 (17C88) tested
72
+
>`clang` is required for installing packages.
73
+
74
+
```sh
75
+
$ curl https://sh.rustup.rs -sSf | sh
76
+
```
77
+
78
+
79
+
- For Windows Systems:
80
+
- Currently not supported for Windows. If on a Windows system, please install [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to continue as Ubuntu.
81
+
82
+
Please make sure that all of the binaries above are included in your `PATH`. These conditions must be fulfilled before building CodeChain from source.
83
+
84
+
85
+
Download CodeChain's source code and go into its directory.
This will produce an executable in the ./target/release directory.
97
+
98
+
###Using CodeChain SDK
99
+
100
+
Before starting to use the CodeChain SDK, please install node.js by going to this [page](https://nodejs.org/en/).
101
+
102
+
Next, install the package with the following command:
103
+
104
+
`npm install codechain-sdk` or `yarn add codechain-sdk`
105
+
23
106
## Run
24
107
25
108
To run CodeChain, just run
26
109
27
-
```
110
+
```sh
28
111
./target/release/codechain -c solo
29
112
```
30
113
You can create a block by sending a parcel through [JSON-RPC](https://github.com/CodeChain-io/codechain/blob/master/spec/JSON-RPC.md) or [JavaScript SDK](https://api.codechain.io/).
@@ -34,14 +117,14 @@ You can create a block by sending a parcel through [JSON-RPC](https://github.com
34
117
35
118
Make sure you run `rustfmt` before creating a PR to the repo. You need to install the nightly-2018-12-06 version of `rustfmt`.
0 commit comments