So from this topic I learnt that cross-compiling from MacOS to Linux is natively not possible in Rust.
I am trying to solve this by using Docker. However, I have no clue on how to get started.
Can someone point me in the right direction on how to setup Docker and how to cross-compile a Rust-project on it?
Install libraries like openssl and libdevssl on that image.
And then what?
In step 4 I have my Rust-project on my MacOS, and a Debian Docker-image. How do I compile my Rust-project using Docker without copy/pasting files between my MacOS and the Docker-image?
cd /go/to/my/project/folder
docker run -ti -v "$PWD":/home/my-project-name name-given-in-commit /bin/bash
Now I had access to the container and my the files from my host OS containing my project were accessible there. Changing a file on my host also instantly changed it in the container and vice versa.
In the container I just had to do cargo build --release. After waiting a long time the binary was generated and accessible on my host.