Both nexush and nexus-cli clients are built for multiple OSes (Linux, Windows, Mac) and architectures (amd64, i386 and arm64). The `BIN` environment variable defines whether to build nexush or nexus-cli.
Both nexush and nexus-cli clients are built for multiple OSes (Linux, Windows, Mac) and architectures (amd64, i386 and arm64).
The line below builds nexush for all supported OSes and architectures, where the public certificate (`ca-cert.pem`) is located in /tmp and the server to use is at ip 10.0.2.15 and listens to port 1077:
```sh
make xbuild_client BIN=nexush CERT=$HOME SERVER=10.0.2.15:1077
```
Below, we build nexus-cli for all supported OSes and architectures, where `ca-cert.pem` is located in $HOME and the server to use is at ip 127.0.0.1 and listens to port 1077:
Below, we build nexus-cli for all supported OSes and architectures, without an embedded certificate, and the server to use is at ip 127.0.0.1 and listens to port 1077:
```sh
make xbuild_client BIN=nexus-cli CERT=$HOME SERVER=127.0.0.1:1077
make xbuild_client BIN=nexus-cli SERVER=127.0.0.1:1077
```
The generated binaries are created in the `build` directory. Here is the corresponding file tree, structured by architectures and OSes:
...
...
@@ -216,6 +225,8 @@ build/
## Specifically building for Linux/amd64
In term of environment variables, this case is identical to [Building nexush and nexus-cli](#building-nexush-and-nexus-cli)
To only build nexush for Linux/amd64:
```sh
make build_nexush CERT=$HOME SERVER=10.0.2.15:1077
...
...
@@ -244,13 +255,16 @@ To run nexus-cli for Linux/i386 with user janedoe@nexus.org:
## Building nexus-exam and running it
The `SERVER_IP` environment variable is required. It defines the nexus-server ip address; it must match the address defined in `config/certs/nexus-server.info` (typically 127.0.0.1 for a development server).
For now, the only supported combination of OS and architecture for nexus-exam is Linux/amd64. Furthermore, it cannot be built statically as some static libraries are missing.
Instead of requiring the `SERVER` environment variable, nexus-exam requires `SERVER_IP`. This variable specifies the nexus-server ip address:
```sh
make build_nexus-exam SERVER_IP=10.0.2.15
```
Running nexus-exam requires the `CERT` environment variable. It specifies the directory where resides the public certificate `ca-cert.pem` (typically `nexus-server/certs/`).
To run it:
```sh
make run_nexus-exam CERT=$HOME SERVER_IP=10.0.2.15