etrombly / rust-crosscompile

docker for cross compiling rust gtk programs to windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. 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:latest
    

    If 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
    
  2. 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:

  1. Modify the Dockerfile to add all your native dependencies

  2. Building the image:

    docker build . -t PROJECTNAME-build-image
    
  3. 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
    
  4. Each time you want to build the project, start the Docker container.

    docker start -ai PROJECTNAME-build
    

About

docker for cross compiling rust gtk programs to windows


Languages

Language:Dockerfile 53.5%Language:Shell 46.5%