From d452578afc986e88a6c6b3538c311139a570498f Mon Sep 17 00:00:00 2001 From: Russell Gilbert Date: Wed, 25 Feb 2026 07:20:14 +0000 Subject: [PATCH] Sets up initial Rust project with ARM64 deployment Introduces the `rustylee` Rust project with a basic "Hello, world!" application. Configures cross-compilation for `aarch64-unknown-linux-gnu` targets using `cargo.toml`. Adds a deployment script to automate pushing the compiled ARM64 binary to a remote host. This enables development and deployment of Rust applications for the target environment. --- src/rustylee/.cargo/config.toml | 2 ++ src/rustylee/.gitignore | 8 ++++++++ src/rustylee/Cargo.lock | 7 +++++++ src/rustylee/Cargo.toml | 6 ++++++ src/rustylee/src/main.rs | 3 +++ utils/deploy_rustylee | 24 ++++++++++++++++++++++++ 6 files changed, 50 insertions(+) create mode 100644 src/rustylee/.cargo/config.toml create mode 100644 src/rustylee/.gitignore create mode 100644 src/rustylee/Cargo.lock create mode 100644 src/rustylee/Cargo.toml create mode 100644 src/rustylee/src/main.rs create mode 100755 utils/deploy_rustylee diff --git a/src/rustylee/.cargo/config.toml b/src/rustylee/.cargo/config.toml new file mode 100644 index 0000000..ff7f758 --- /dev/null +++ b/src/rustylee/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" \ No newline at end of file diff --git a/src/rustylee/.gitignore b/src/rustylee/.gitignore new file mode 100644 index 0000000..5cc2ed8 --- /dev/null +++ b/src/rustylee/.gitignore @@ -0,0 +1,8 @@ +# The build directory where all the binaries and object files live +/target + +# If you ever use a tool like 'cargo expand' or 'cargo profiler' +**/*.rs.bk + +# If you use a local IDE setting that shouldn't be shared +.idea/ \ No newline at end of file diff --git a/src/rustylee/Cargo.lock b/src/rustylee/Cargo.lock new file mode 100644 index 0000000..2628397 --- /dev/null +++ b/src/rustylee/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "rustylee" +version = "0.1.0" diff --git a/src/rustylee/Cargo.toml b/src/rustylee/Cargo.toml new file mode 100644 index 0000000..b90ad28 --- /dev/null +++ b/src/rustylee/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "rustylee" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/src/rustylee/src/main.rs b/src/rustylee/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/rustylee/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/utils/deploy_rustylee b/utils/deploy_rustylee new file mode 100755 index 0000000..15b17c0 --- /dev/null +++ b/utils/deploy_rustylee @@ -0,0 +1,24 @@ +#!/bin/bash + +# Configuration +# Note: We point to the specific ARM64 release folder Cargo created +LOCAL_BIN="$HOME/dev/Dixon/src/rustylee/target/aarch64-unknown-linux-gnu/release/rustylee" +REMOTE_TARGET="russellg59@dixon1" +REMOTE_DIR="/home/russellg59/dixon" +REMOTE_EXE="$REMOTE_DIR/rustylee" # Changed to avoid overwriting your C++ app + + +# Check if the monster PC actually finished the build +if [ ! -f "$LOCAL_BIN" ]; then + echo "Error: Binary not found at $LOCAL_BIN" + exit 1 +fi + +echo "Cleaning remote path and pushing binary..." + +# Remove the target first to prevent the 'directory' bug, then push and fix permissions +ssh $REMOTE_TARGET "rm -rf $REMOTE_EXE" +scp "$LOCAL_BIN" $REMOTE_TARGET:"$REMOTE_EXE" +ssh $REMOTE_TARGET "chmod +x $REMOTE_EXE" + +echo "Deployment complete: $REMOTE_EXE"