Skip to content

Instantly share code, notes, and snippets.

@gleich
Last active January 17, 2022 21:52
Show Gist options
  • Select an option

  • Save gleich/8b1a92386587fc2d92ad31fa70ce763e to your computer and use it in GitHub Desktop.

Select an option

Save gleich/8b1a92386587fc2d92ad31fa70ce763e to your computer and use it in GitHub Desktop.
# tap the macos-cross-toolchains repo
brew tap messense/macos-cross-toolchains
# install the armv7-unknown-linux-gnueabihf linker
brew install armv7-unknown-linux-gnueabihf
# tell cargo what linker to use when targeting armv7-unknown-linux-gnueabihf
printf "[target.armv7-unknown-linux-gnueabihf]\nlinker = \"armv7-unknown-linux-gnueabihf-gcc\"\n" >> ~/.cargo/config
# now just run the following command from the root of your rust project!
# cargo build --target=armv7-unknown-linux-gnueabihf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment