Skip to content

Tool to cross compile and upload rust projects to a Raspberry Pi.

License

Notifications You must be signed in to change notification settings

doggodoge/rust2pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Tool to cross compile and upload rust projects to a Raspberry Pi.

Topics

Resources

License

Stars

Watchers

Forks