Cross compiling support

⚓ Rust    📅 2025-11-04    👤 surdeus    👁️ 9      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Cross compiling support

Every time I come back to Rust it seems I waste a bunch of time fighting cross-compilation or the lack of support of it.

One funny example is me yesterday using ansible to build an Axum app and shift it into an Orbstack Ubuntu VM. Turns out that if you build the app on macOS, it'll happily run and then complain that it can't get environment variables.

(Insert 2 hours late at night of me locking myself out of the VM using ansible and then trying to debug systemd EnvironmentFile.)

Can there be some kind of error here saying: "oy, I'm not supposed to be here"?

Supposedly " rustc is a cross-compiler by default" but I've wasted tons of hours already in the past trying to get my macOS machine to build something that will work on Linux (either aarch64 or x86_64) without any success. That's why I'm not going to even try this now.

Isn't it the case that doing something like this is trivial in Go and Zig?

1 post - 1 participant

Read full topic

🏷️ Rust_feed