User Tools

Site Tools


rust

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rust [2026-01-15 20:23 UTC (4 months ago)] – created hypharust [2026-04-11 00:46 UTC (7 weeks ago)] (current) – add framebuffer link here 1e1001
Line 1: Line 1:
 +====== Rust ======
 +
 +
 You can run rust on the pm3 by compiling a rust project for ''armv7-unknown-linux-gnueabihf'' like so: You can run rust on the pm3 by compiling a rust project for ''armv7-unknown-linux-gnueabihf'' like so:
  
-''cross build --release --target armv7-unknown-linux-gnueabihf''+  cross build --release --target armv7-unknown-linux-gnueabihf
  
 Because the pm3 uses an ancient version of glibc, you'll need to add a ''.cargo/config.toml'' file to your project. Because the pm3 uses an ancient version of glibc, you'll need to add a ''.cargo/config.toml'' file to your project.
  
-'' +  [target.armv7-unknown-linux-gnueabihf] 
-[target.armv7-unknown-linux-gnueabihf] +  rustflags = ["-C", "target-feature=+crt-static"
-rustflags = ["-C", "target-feature=+crt-static"+ 
-''+<del>scp doesn't seem to work, but moving binaries to the device can still be accomplished in a number of ways and this is what occurred to hypha first.
  
-scp doesn't seem to work, but moving binaries to the device can still be accomplished in a number of ways and this is what occurred to hypha first.+''cat target/armv7-unknown-linux-gnueabihf/release/project | ssh root@pm3ip 'cat - > /tmp/project; chmod +x /tmp/project'''</del>
  
-''cat target/armv7-unknown-linux-gnueabihf/release/project | ssh root@pm3ip 'cat - > /tmp/project; chmod +x /tmp/project'''+scp works fine provided the -O (legacy) flag is provided.
  
-As a bonus tip, you can use slint on the device for building a GUI with the ''slint-backend-linuxfb'' crate, which will software render directly to /dev/fb0+As a bonus tip, you can use slint on the device for building a GUI with the ''slint-backend-linuxfb'' crate, which will software render directly to /dev/fb0 ([[framebuffer]])
  
rust.1768508607.txt.gz · Last modified: by hypha