February 2019
Intermediate to advanced
450 pages
11h 59m
English
To install the dependencies for cross compiling for Linux, we'll use the Homebrew package manager again—see the previous sections or https://brew.sh/ for installation instructions. Using Homebrew, we'll install the appropriate packages by opening a Terminal and executing the following commands (the HOMEBREW_BUILD_FROM_SOURCE variable works around an issue with musl-cross depending on potentially old versions of libraries):
Once the installation is complete (this may take some time as it's building a complete compiler toolchain from source), you should be able to build for Linux. To do so, you'll need to set the environment variables,
Read now
Unlock full access