Tool to cross compile and upload rust projects to a Raspberry Pi.
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| utils | ||
| .gitignore | ||
| LICENSE | ||
| main.ts | ||
| README.md | ||
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.tomlsetup 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.