Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Last active February 24, 2017 09:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhoff/ba45a9584184a471c0a1 to your computer and use it in GitHub Desktop.
Save alanhoff/ba45a9584184a471c0a1 to your computer and use it in GitHub Desktop.
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