Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure building Rust project for Raspberry Pi #20

Merged
merged 8 commits into from
Mar 1, 2024

Conversation

taesungh
Copy link
Member

@taesungh taesungh commented Feb 15, 2024

Resolves #1.

Changes

  • Add Cargo config to set build target platform and linker
  • Include setup instructions in README

Testing

  1. Build the project with the ARM target from your personal machine
  2. Attempt to run the executable on the Raspberry Pi in lab
  3. Observe the program behaves as expected

Remaining tasks

  • Include compiler installation instructions for macOS
  • Include compiler installation instructions for Windows
  • Include alternative instructions for using cross
  • Update checks workflow to support cross-compilation

@taesungh taesungh requested a review from a team February 15, 2024 23:06
@taesungh
Copy link
Member Author

Following from #15, we'll also need to update the checks workflow to be able to compile for arm-linux.

Copy link
Contributor

@SM-dot SM-dot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for setting this up!

  • Is there a certain minimum required versions of Rust, cargo-watch, and Docker required?

  • While the cross-compilation section is thorough for Windows/Linux, the instructions for MacOS appear relatively brief. Would it be possible to provide additional details or addressing specific MacOS nuances to maintain consistency and completeness across all platforms?

@taesungh
Copy link
Member Author

We specify Rust edition 2021 in Cargo.toml. We would expect developers to use modern versions of cargo and rustc although older versions should also work. The Docker setup instructions actually apply to all host operating systems, and Sam will be providing a separate section for native compilation on Windows. There aren't many nuances with using the ARM compiler on macOS although we may need a separate script to distinguish host OS (pending discussion with Sam).

@taesungh taesungh marked this pull request as draft February 26, 2024 23:50
@taesungh taesungh marked this pull request as ready for review February 28, 2024 21:06
Copy link
Contributor

@samderanova samderanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one small issue.

pod-operation/README.md Outdated Show resolved Hide resolved
pod-operation/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@samderanova samderanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Please squash merge.

@taesungh taesungh merged commit 04177bd into main Mar 1, 2024
2 checks passed
@taesungh taesungh deleted the setup/cross-compilation branch April 30, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up pod operation programming environment
3 participants