The "Warf" Way: Seamless Windows Testing on Linux using MinGW & Wine

Search for a command to run...

No comments yet. Be the first to comment.
This series explores how to build a seamless, fully containerized CI/CD pipeline for C++ projects without ever leaving Linux. By wrapping toolchains and translation layers like MinGW, Wine, osx-cross, and Darling inside Docker, "The Warf Way" demonstrates how to compile and execute Windows and macOS binaries from a single environment. Learn how to eliminate context switching, drop expensive dedicated CI hardware, and guarantee reproducible builds across your entire development lifecycle.
In my last post, The Warf Way: Seamless Windows Testing we looked at how to streamline Windows testing by leveraging Docker and Wine. It provided a seamless way to validate Windows-specific logic with
Today we are deconstructing the 4-Star Dragon Ball shader (available on Shadertoy here). This shader is a good example of using 2D math to drive 3D optical effects. To understand it, we must reference

In Part 1, I talked about the high-level "magic" happening on your wrist. How Apple uses neural networks and math to guess your VO2Max even when you’re just walking around the block. But if you're lik
I am a data junkie. I track, measure, and optimize. So, when a severe ankle injury recently sidelined me, the hardest part wasn't the physical pain it was watching my hard earned fitness metrics plumm

In my previous post, I detailed how our move from the Android Emulator to standalone Android-x86 VHDX images gave us impressive cost saving wins for our fuzzing budget. With any infrastructure pivot,

When I was the head of Microsoft's Edge security for the US market, we ran into an infrastructure challenge that forced us to completely rethink how we fuzzed Android. The project we built no longer e
In the world of language development, even a "toy" language needs a solid foundation. My project, warfLang, isn't trying to replace C++ or Rust. It’s an LL(1) parser written in C++ that generates an Abstract Syntax Tree (AST)—essentially a glorified calculator that supports variable definitions.
But even a calculator needs to count correctly on every platform. To ensure warfLang remains truly cross-platform, I needed a CI/CD pipeline that could verify its logic on Windows without the overhead of actually owning a Windows machine.
Even for a high-level parser, moving from Linux to Windows introduces subtle behavioral risks and differences especially when you are compiling acros different compilers like CL, Clang, and GCC or different libC implementations.
Inspired by Gianni Milanesi’s post, I realized I didn't need a native Windows environment to find out. I just needed a containerized "Build Appliance."
Note this post will not be the promised part 5 of the Cross-Compiling series since we are using mingw-w64 and not clang.
Instead of manually managing cross-compilers, I use a custom Dockerfile Dockerfile.mingw-cross. This encapsulates the entire MinGW-w64 suite, ensuring that the environment where I build warfLang today is the exact same one I'll use six months from now.
Zero Setup: A new contributor doesn't need to install binutils-mingw-w64. They just run the container.
Consistency: It's a container, it always the works the same thats the point.
The "Magic" Compiler: We get instant access to x86_64-w64-mingw32-gcc, which treats our C++ code as a native Windows project.
FROM ubuntu:latest
# Install MinGW for building and Wine for testing
RUN apt-get update && apt-get install -y \
mingw-w64 \
cmake \
wine \
&& rm -rf /var/lib/apt/lists/\*
...
RUN cmake -S . -B build \
-GNinja -DCMAKE\_BUILD\_TYPE=Release \
-DCMAKE\_C\_COMPILER=x86\_64-w64-mingw32-gcc-posix \
-DCMAKE\_CXX\_COMPILER=x86\_64-w64-mingw32-g++-posix \
-DBuildTest=TRUE \
-DCMAKE\_SYSTEM\_NAME=Windows -DCMAKE\_CROSS\_COMPILING=TRUE
The real value of the "Warf" way is the inclusion of Wine. For a project like warfLang , testing is straightforward: I feed the parser an expression (like x = 5; x * 2;), and I expect a specific AST output. By bundling Wine in the Docker image, I can run the Windows version immediately after compiling it without having to context switch to a new device. This works the same on my local dev machines as well as in the CI.
wine ./warf_tests.exe in a headless Docker container gives me instant feedback if something works on windows without having to have a dedicated windows device.By using this crossPlat builder approach, my GitHub Actions workflow is faster and cheaper (see runner pricing). I pull a single Linux-based image, build the Windows .exe file, and run the test suite through Wine.
When I see the "Green Checkmark" now it proves that the "calculator" works on Windows, even though it was born and raised on Linux.
Whether you're building a massive compiler or a glorified calculator like warfLang , the "Warf" way combining Docker, MinGW, and Wine provides a professional, reproducible, and verifiable way to ship to Windows users without ever leaving the comfort of Linux.
Check out the implementation and play with the parser in the WarfLang WASM demo.
First published 4/19/26 on blog.farzon.org