Tool to cross compile and upload rust projects to a Raspberry Pi.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2022-03-13 21:33:12 +00:00
utils add issue number to todo 2022-03-13 21:22:07 +00:00
.gitignore initial commit 2022-03-13 18:42:48 +00:00
LICENSE Create LICENSE 2022-03-13 21:33:12 +00:00
main.ts reformat main.ts 2022-03-13 20:50:45 +00:00
README.md correct README.md 2022-03-13 18:59:27 +00:00

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.