Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 854 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 854 Bytes

rust2pi

Deno script to set up a rust project for cross compilation for RPi if required, build, and rsync it up to the pi.

What this does

  • Check if we are in a cargo project.
  • Check if lld linker is installed.
  • Check if we have the correct rust toolchain installed and install if not.
  • Check if we have the correct .cargo/config.toml setup for lld, and if not set it up.
  • Build the project.
  • Rsync the project onto the raspberry pi.

I suspect this will only work if you use pure rust code, so out of luck if you use C bindings etc. unless it supports cross compilation.

Dependencies

  • Deno runtime. You can get this from deno.land

Usage

deno run --allow-run --allow-read --allow-write path/to/main.ts -- username@1.2.3.4

Best to create a script for this with an absolute path to main.ts.