fix: translate Rust ARM64 target for Zig - #78
Conversation
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
📝 WalkthroughWalkthroughThe AArch64 musl build configuration now disables default standard-library linkage and updates generated Zig C/C++ wrappers to remove incompatible Rust target arguments before compilation. ChangesAArch64 musl build configuration
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)✅ Unit Test PR creation complete.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
|
Note Unit test generation is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ Created PR with unit tests: #81 |
Failures resolved
cc-rsforwarded Rust's--target=aarch64-unknown-linux-musl, which Zig rejects because its equivalent triple isaarch64-linux-musl._start/_start_csymbols because Rust's self-contained musl target and Zig both suppliedcrt1.o.Fix
--targetargument and invoke Zig withaarch64-linux-musl; every other compiler argument is preserved.zig ccalways injects its own muslcrt1.oand honours neither-nostartfilesnor-nostdlibto suppress it (reproduced and verified against Zig 0.15.2 by cross-compiling a musl binary), so the duplicate_startcannot be resolved from the wrapper side. Instead the aarch64 build disables Rust's self-contained linking so Rust stops emitting its own CRT/libc and Zig alone owns the CRT, libc, and libunwind:echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS=-C link-self-contained=no"Acceptance
The branch runs the real
v0.7.6portable release workflow. Linux ARM64 must compile and link, publish alongside both macOS binaries, generateSHA256SUMS, and update the stable manifest.