-
Notifications
You must be signed in to change notification settings - Fork 1
Fix: Use cross for cross compilation #14
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
Changes from all commits
ae799c9
80d69fa
a8c71ad
bf658a0
e5ab64e
eb0b2cc
7b5c773
0a14696
81e81c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,7 +44,14 @@ jobs: | |||||||||||||||||||||||||||||||||
| profile: minimal | ||||||||||||||||||||||||||||||||||
| target: ${{ matrix.target }} | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - name: Build release binary | ||||||||||||||||||||||||||||||||||
| - name: Build release binary (ARM Linux native) | ||||||||||||||||||||||||||||||||||
| if: matrix.target == 'aarch64-unknown-linux-gnu' | ||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||
| cargo install cross --git https://github.com/cross-rs/cross | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| cargo install cross --git https://github.com/cross-rs/cross | |
| cargo install cross |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step names are misleading. Step '(ARM Linux native)' uses cross-compilation via the cross tool, while '(cross-compile)' uses native cargo. Consider renaming to '(ARM Linux with cross)' and '(native cargo)' respectively to accurately reflect their functionality.
| - name: Build release binary (ARM Linux native) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cargo install cross --git https://github.com/cross-rs/cross | |
| cross build --release --target ${{ matrix.target }} | |
| - name: Build release binary (cross-compile) | |
| - name: Build release binary (ARM Linux with cross) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cargo install cross --git https://github.com/cross-rs/cross | |
| cross build --release --target ${{ matrix.target }} | |
| - name: Build release binary (native cargo) |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step name 'cross-compile' is confusing because this step uses native cargo build, not cross-compilation. The aarch64 target is actually the one being cross-compiled. Consider renaming to 'Build release binary (native)' for clarity.
| - name: Build release binary (cross-compile) | |
| - name: Build release binary (native) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing
crossfrom git on every build will be slow and inefficient. Consider caching the installation or using a pre-built release version withcargo install cross(without --git flag) for faster builds.