Building an app on macOS/Windows but deploying on FreeBSD

I’m developing a Rust app on macOS and Windows. The deployment environment is FreeBSD. Do I just compile/build the app on macOS or Windows, and then just upload to FreeBSD to run it?

You should cross-compile

Doesn’t look that straightforward and easy.

I see this list of targets:

Which: (1) uploading the source code to the FreeBSD server or (2) compile it locally using macOS or Windows - is easier and more ‘guaranteed to compile/build and run/execute/work’?


I would think Option 1 will be “easier and more ‘guaranteed to compile/build and run/execute/work’”.

That said for my titlecase project I use trust, which automates the cross compilation for you to fairly simply get Travis CI to produce binaries for Linux, macOS, FreeBSD, and NetBSD. Perhaps the CI route might be an option to consider.