@@ -76,7 +76,73 @@ Configuration example:
76
76
77
77
* [ ChirpStack homepage] ( https://www.chirpstack.io/ )
78
78
79
+ ## Building from source
80
+
81
+ ### Requirements
82
+
83
+ Building ChirpStack UDP Forwarder requires:
84
+
85
+ * [ Nix] ( https://nixos.org/download.html ) (recommended) and
86
+ * [ Docker] ( https://www.docker.com/ )
87
+
88
+ #### Nix
89
+
90
+ Nix is used for setting up the development environment which is used for local
91
+ development and for creating the binaries.
92
+
93
+ If you do not have Nix installed and do not wish to install it, then you can
94
+ use the provided Docker Compose based Nix environment. To start this environment
95
+ execute the following command:
96
+
97
+ ``` bash
98
+ make docker-devshell
99
+ ```
100
+
101
+ ** Note:** You will be able to run the test commands and run ` cargo build ` , but
102
+ cross-compiling will not work within this environment (because it would try start
103
+ Docker within Docker).
104
+
105
+ #### Docker
106
+
107
+ Docker is used by [ cross-rs] ( https://github.com/cross-rs/cross ) for cross-compiling,
108
+ as well as some of the ` make ` commands.
109
+
110
+ ### Starting the development shell
111
+
112
+ Run the following command to start the development shell:
113
+
114
+ ``` bash
115
+ nix-shell
116
+ ```
117
+
118
+ Or if you do not have Nix installed, execute the following command:
119
+
120
+ ``` bash
121
+ make docker-devshell
122
+ ```
123
+
124
+ ### Running tests
125
+
126
+ Execute the following command to run the tests:
127
+
128
+ ``` bash
129
+ make test
130
+ ```
131
+
132
+ ### Building binaries
133
+
134
+ Execute the following commands to build the ChirpStack UDP Forwarder binaries
135
+ and packages:
136
+
137
+ ``` bash
138
+ # Only build binaries
139
+ make build
140
+
141
+ # Build binaries + distributable packages.
142
+ make dist
143
+ ```
144
+
79
145
## License
80
146
81
147
ChirpStack UDP Forwarder is distributed under the MIT license. See
82
- [ LICENSE] ( https://github.com/brocaar/chirpstack-udp-bridge /blob/master/LICENSE ) .
148
+ [ LICENSE] ( https://github.com/brocaar/chirpstack-udp-forwarder /blob/master/LICENSE ) .
0 commit comments