Skip to content

feat: Replace MSVC with mingw for windows wheels#143

Open
Copilot wants to merge 22 commits intomainfrom
copilot/use-mingw-in-builds
Open

feat: Replace MSVC with mingw for windows wheels#143
Copilot wants to merge 22 commits intomainfrom
copilot/use-mingw-in-builds

Conversation

Copy link

Copilot AI commented Mar 20, 2026

A long time issue with Selene on Windows is that, due to having MSVC bindings, installation is not straightforward; users first need to ensure that they have MSVC runtime libraries available on their system. These can only be distributed by Microsoft.

MinGW, on the other hand, is open source, and is freely available. We can bundle its standard library libstdc++-6.dll with selene (due to the GCC Runtime Library Exception of GPL). The user needs to do nothing - just pip install selene_sim and they're off to the races.

Recently we've been getting build failures in windows CI due to a conflict between mingw and msvc, which appears to be due to a windows worker update. It seems like a good opportunity to get this MSVC pain out of the way.

This was my first PR crafted with the github copilot action. It took some guiding, but it ended up as something that is workable in CI, and on a windows machine without msvc installed, including testing proprietary plugins to ensure that they aren't impacted by this change. It's likely some cleanup will be necessary, but overall it appears to work great.

Copilot AI and others added 3 commits March 20, 2026 11:37
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title [WIP] Use mingw instead of MSVC for windows builds Switch Windows wheel/build path from MSVC to MinGW (windows-gnu) Mar 20, 2026
Copilot AI requested a review from jake-arkinstall March 20, 2026 11:43
Copilot AI and others added 3 commits March 20, 2026 12:01
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Switch Windows wheel/build path from MSVC to MinGW (windows-gnu) Switch Windows builds from MSVC to MinGW (windows-gnu) across wheel packaging and runtime linking Mar 20, 2026
Copilot AI and others added 2 commits March 20, 2026 12:21
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Switch Windows builds from MSVC to MinGW (windows-gnu) across wheel packaging and runtime linking Fix repeated PR CI failures: Ruff formatting drift and Windows GNU Stim linker runtime Mar 20, 2026
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Fix repeated PR CI failures: Ruff formatting drift and Windows GNU Stim linker runtime Fix recurring Windows GNU wheel CI failures by resolving target-specific Cargo artifact paths Mar 20, 2026
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Fix recurring Windows GNU wheel CI failures by resolving target-specific Cargo artifact paths Stabilize Windows wheel CI by skipping strict-build tests that hard-crash in native QIR path Mar 20, 2026
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Fix Windows GNU wheel failures by aligning Helios interface build mode/toolchain artifacts Align Windows GNU Helios build artifacts with MinGW to fix recurring Zig link failures Mar 20, 2026
Copilot AI and others added 2 commits March 20, 2026 14:59
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Align Windows GNU Helios build artifacts with MinGW to fix recurring Zig link failures Fix Windows GNU Helios interface artifact selection (.a vs .lib) and preserve MSVC fallback Mar 20, 2026
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Fix Windows GNU Helios interface artifact selection (.a vs .lib) and preserve MSVC fallback Harden Windows Stim plugin loading by static-linking MinGW C++ runtime Mar 20, 2026
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Copilot AI changed the title Harden Windows Stim plugin loading by static-linking MinGW C++ runtime Harden Windows Stim wheel loading by eliminating remaining MinGW runtime DLL dependency Mar 20, 2026
Copilot AI and others added 2 commits March 20, 2026 17:32
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Quantinuum/selene/sessions/8f971902-d5dd-4079-87cc-9322f8fde803
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Quantinuum/selene/sessions/8f971902-d5dd-4079-87cc-9322f8fde803
Copilot AI changed the title Harden Windows Stim wheel loading by eliminating remaining MinGW runtime DLL dependency Bundle MinGW libstdc++ for Stim on Windows and expose plugin runtime search path Mar 20, 2026
Co-authored-by: jake-arkinstall <65358059+jake-arkinstall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Quantinuum/selene/sessions/e4702529-e46f-4088-80f4-0ae33a9fd653
Copilot AI changed the title Bundle MinGW libstdc++ for Stim on Windows and expose plugin runtime search path Eliminate Windows Stim runtime load failure from MinGW DLL/API-set dependency chain Mar 20, 2026
@jake-arkinstall jake-arkinstall changed the title Eliminate Windows Stim runtime load failure from MinGW DLL/API-set dependency chain feat: Replace MSVC with mingw for windows wheels Mar 20, 2026
@jake-arkinstall jake-arkinstall marked this pull request as ready for review March 20, 2026 22:38
@jake-arkinstall jake-arkinstall requested a review from ss2165 as a code owner March 20, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants