项目作者: Mikayex

项目描述 :
Cross docker image for RPi 1/RPi 0 Rust development
高级语言: Shell
项目地址: git://github.com/Mikayex/rust-rpi0-cross.git
创建时间: 2019-03-29T14:44:31Z
项目社区:https://github.com/Mikayex/rust-rpi0-cross

开源协议:MIT License

下载


rust-rpi0-cross

Docker Build Status

Cross docker image for RPi 1/RPi 0 rust development.

Beside default cross image, it contains :

  • arm-unknown-linux-gnueabihf cross compiler for Raspberry Pi 1/Raspberry Pi Zero(W)
  • vc libraries
  • cross test and cross run can optionally upload and run to target device

How to use

In your Cross.toml (create it if needed) put :

  1. [target.arm-unknown-linux-gnueabihf]
  2. image = "mikaye/rust-rpi0-cross"

Now you can do cross test --target=arm-unknown-linux-gnueabihf and it will build and run tests. Note that it is run locally with qemu. See next section for remote run.

Remote run

To cross-build locally then run on the Pi itself add these lines to your Cross.toml :

  1. [target.arm-unknown-linux-gnueabihf.env]
  2. passthrough = ["CROSS_REMOTE_HOST"]

Then put your connection in CROSS_REMOTE_HOST environment variable with the same format as you would in SSH command (user@hostname:port)