Advanced: Compiling From Source (Optional)¶
If you have Rust installed, you can compile from source with the following command:
Note: To compile, you usually need the latest version of Rust.
You can download the latest unstable version from the main branch or the latest stable version from the Releases page.
Be sure to periodically update Rust with:
The compiled binary will be outputted in the ./target/release folder.
Updating Rust Packages¶
You can update to the latest Rust crates before compiling:
Please let us know if anything breaks after you update.
Cross-compiling 32-bit Windows Binaries¶
You can create 32-bit binaries on 64-bit Windows systems with the following:
rustup install stable-i686-pc-windows-msvc
rustup target add i686-pc-windows-msvc
rustup run stable-i686-pc-windows-msvc cargo build --release
Warning: Be sure to run
rustup install stable-i686-pc-windows-msvcwhenever there is a new stable version of Rust asrustup update stablewill not update the compiler for cross compiling and you may receive build errors.
macOS Compiling Notes¶
If you receive compile errors about openssl, you will need to install Homebrew and then install the following packages:
Linux Compiling Notes¶
The following build dependencies are required:
- openssl-devel (Fedora-based) / libssl-dev (Ubuntu-based)
- perl
- musl-gcc
Cross-compiling Linux MUSL Binaries¶
On a Linux OS, first install the target.
Compile with:
Warning: Be sure to run
rustup install stable-x86_64-unknown-linux-muslwhenever there is a new stable version of Rust asrustup update stablewill not update the compiler for cross compiling and you may receive build errors.
The MUSL binary will be created in the ./target/x86_64-unknown-linux-musl/release/ directory.
MUSL binaries are are about 15% slower than the GNU binaries, however, they are more portable accross different versions and distributions of linux.