Build from source¶
It’s generally recommended to install a package if available. This section is about building the binary from git.
You need a recent rust compiler. It’s usually recommended to install a rust compiler with rustup, but if you’re system ships the most recent compiler in a package that works too. Note that some systems aren’t fully supported by rustup (like OpenBSD and alpine) and you need to install rust from a package in that case.
$ pacman -S geoip2-database libseccomp libsodium publicsuffix-list sqlite
$ brew install libsodium
$ apt install build-essential libsqlite3-dev libseccomp-dev libsodium-dev publicsuffix
On a debian based system make sure you’ve installed rust with rustup.
$ apk add sqlite-dev libseccomp-dev libsodium-dev
$ pkg_add sqlite3 geolite2-city geolite2-asn libsodium
emerge --ask sys-libs/libseccomp dev-db/sqlite dev-libs/libsodium
You don’t need to install any dependencies on windows, but you need to use a different build command in the next section.
After all dependencies have been installed, simply build the binary:
$ cargo build --release
Note that you need a different command on windows:
$ cargo build --release --features=sqlite-bundled
After the build finished the binary is located at