@@ -7,6 +7,17 @@ Docker image for building Go binaries for **Windows** with MinGW-w64 toolchain b
77
88Image provides simple cross-compilation environment for windows 32 and 64bit builds.
99
10+ ** Supports Windows on Arm!**
11+
12+ ## Supported Architectures
13+
14+ Here is a list of supported host and target architectures:
15+
16+ | Host Architecture | Win x86 | Win x86-64 | Win Arm |
17+ | ------------------- | ------- | ---------- | ------- |
18+ | ** arm64 / aarch64** | ✅ | ✅ | ✅ |
19+ | ** amd64** | ✅ | ✅ | ✅ |
20+
1021## Usage
1122
1223You can pull Docker image with desired Go version from Docker Hub:
@@ -16,7 +27,7 @@ docker pull x1unix/go-mingw:latest # or "1.21" for specific Go version
1627```
1728
1829> [ !TIP]
19- > Please take a look at [ full project build example ] ( example/sqlite-app ) before starting to work.
30+ > Please take a look at [ examples ] ( example/ ) before starting to work.
2031
2132### Building Go applications inside container
2233
@@ -30,7 +41,17 @@ docker run --rm -it -v /YourPackageSrc:/go/work \
3041
3142You will get compiled Windows binary.
3243
33- ** For 32-bit toolchain**
44+ #### Windows On Arm
45+
46+ Set ` GOARCH=arm64 ` to build ARM Windows binary:
47+
48+ ``` shell
49+ docker run --rm -it -e GOARCH=arm64 -v /YourPackageSrc:/go/work \
50+ -w /go/work \
51+ x1unix/go-mingw go build .
52+ ```
53+
54+ #### For 32-bit toolchain
3455
3556To build a 32-bit executable, set ` GOARCH=386 ` variable:
3657
@@ -41,7 +62,7 @@ docker run --rm -it -e GOARCH=386 -v /YourPackageSrc:/go/work \
4162```
4263
4364> [ !TIP]
44- > See full project build example [ here] ( example/sqlite-app ) .
65+ > See check project build examples [ here] ( example ) .
4566
4667### Go linker flags override
4768
@@ -124,3 +145,8 @@ make image GO_VERSION=1.20
124145> [ !IMPORTANT]
125146> Replace ` 1.20 ` with desired Go version.
126147
148+ ## Credits
149+
150+ * [ llvm-mingw] ( https://github.com/mstorsjo/llvm-mingw ) for Windows on Arm support.
151+ * [ mingw-w64] ( https://www.mingw-w64.org/ ) - for Windows on x86 and amd64 support.
152+ * The Go maintainers.
0 commit comments