Skip to content

Instantly share code, notes, and snippets.

@alanhoff

alanhoff/readme.md

Last active Feb 24, 2017
Embed
What would you like to do?
Cross compile Rust

Packages

  • Windows x86_64: sudo apt-get install gcc-mingw-w64
  • ARM sudo apt-get install arm-linux-gnueabihf-cpp-4.8
  • PowerPC sudo apt-get install gcc-powerpc-linux-gnu

Config

Create a file inside PROJECT/.cargo/config with the followig content

# ARM
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc-4.8"

# Windows x86_64
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"

# PowerPC
[target.powerpc-unknown-linux-gnu]
linker = "powerpc-linux-gnu-gcc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment