2022-05-31 11:54:46 +02:00
|
|
|
# Installation
|
2021-02-23 11:41:37 +01:00
|
|
|
|
|
|
|
Currently there are no distribution packages available.
|
|
|
|
However installation is reasonably straight-forward, since Diflouroborane compiles into a single
|
|
|
|
mostly static binary with few dependencies.
|
|
|
|
|
|
|
|
At the moment only Linux is supported. If you managed to compile Diflouroborane please open an issue
|
|
|
|
outlining your steps or add a merge request expanding this part. Thanks!
|
|
|
|
|
2022-05-31 11:54:46 +02:00
|
|
|
## Requirements
|
2021-02-23 11:41:37 +01:00
|
|
|
|
|
|
|
General requirements; scroll down for distribution-specific instructions
|
|
|
|
|
|
|
|
- GNU SASL (libgsasl).
|
|
|
|
* If you want to compile Diflouroborane from source you will potentially also need development
|
|
|
|
headers
|
|
|
|
- capnproto
|
|
|
|
- rustc stable / nightly >= 1.48
|
|
|
|
* If your distribution does not provide a recent enough rustc, [rustup](https://rustup.rs/) helps
|
|
|
|
installing a local toolchain and keeping it up to date.
|
|
|
|
|
|
|
|
###### Arch Linux:
|
|
|
|
```shell
|
|
|
|
$ pacman -S gsasl rust capnproto
|
|
|
|
```
|
|
|
|
|
2022-05-31 11:54:46 +02:00
|
|
|
## Compiling from source
|
2021-02-23 11:41:37 +01:00
|
|
|
|
|
|
|
Diflouroborane uses Cargo, so compilation boils down to:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ cargo build --release
|
|
|
|
```
|
|
|
|
|
2022-05-31 13:08:14 +02:00
|
|
|
The compiled binary can then be found in `./target/release/bffhd`
|
2022-05-31 11:54:46 +02:00
|
|
|
|
|
|
|
### Cross-compiling
|
|
|
|
|
|
|
|
If you need to compile for a different CPU target than your own (e.g. you want
|
|
|
|
to use BFFH on a raspberry pi but compile on your desktop PC), you need to
|
|
|
|
setup a cross-compilation toolchain and configure your Cargo correctly.
|
|
|
|
[The `CONTRIBUTING.md` has a section on how to setup a cross-compilation system.](CONTRIBUTING.md#cross-compilation)
|
2022-05-31 13:08:14 +02:00
|
|
|
|
|
|
|
# Running bffhd
|
|
|
|
|
|
|
|
The server can be ran either using `cargo`, which will also compile the binary if necessary, or directly.
|
|
|
|
|
|
|
|
When running using `cargo` you need to pass arguments to bffh after a `--`, so
|
|
|
|
e.g. `cargo run --release -- --help` or `cargo run --release -- -c examples/bffh.toml`.
|
|
|
|
|
|
|
|
When running directly the `bffhd` binary can be copied anywhere.
|
|
|
|
|
|
|
|
A list of arguments for the server is found in the help, so `bffhd --help` or `cargo run --release -- --help`.
|