Hi… I may be misunderstanding what you’re trying, but the default is to build remotely—exactly because it does sidestep this issue.
The latest builders are managed by a separate company, and you should get them automatically when using a recent version of flyctl
.
https://community.fly.io/t/depot-remote-builders-becoming-the-default/21756
Your source code is uploaded to the builder by flyctl
as an initial step (glossing over some details here). That way, you both compile and run on the same platform: Linux x86-64.
In contrast, compiling on one architecture but then running on another (i.e., cross-compiling), while often possible, can prove challenging even for experienced users, .
Hope this helps a little!