rust-crosscompile
rust-crosscompile copied to clipboard
docker for cross compiling rust gtk programs to windows
Rust Cross-compile
Docker container for cross compiling rust gtk apps to Windows from Linux.
By default will package all required DLLs into a package.zip.
Typical usage:
-
Create a container with the source mounted the image (which starts the build):
docker create -v "$(pwd)":/home/rust/src --name PROJECTNAME-build rust-crosscompile:latestIf you'd like to use the included windows 10 theme create the container like this:
docker create -e WIN_THEME=true -v "$(pwd)":/home/rust/src --name PROJECTNAME-build rust-crosscompile:latest -
Each time you want to build the project, start the Docker container.
docker start -ai PROJECTNAME-build
If there are dependencies you need that are not included in the official image:
-
Modify the Dockerfile to add all your native dependencies
-
Building the image:
docker build . -t PROJECTNAME-build-image -
Create a container with the source mounted the image (which kicks off the build):
docker create -v "$(pwd)":/home/rust/src --name PROJECTNAME-build PROJECTNAME-build-image -
Each time you want to build the project, start the Docker container.
docker start -ai PROJECTNAME-build