← Back to Pull requests

Add the MSVC C++ STL library #35784

Closed
unknown closed this pull request without merging on Nov 26, 2026 00:36 UTC
View on GitHub
unknown unknown commented on Nov 22, 2026 07:58 UTC
Author

This PR adds the recipe for the MSVC C++ STL to conda-forge. @h-vetinari @isuruf please comment here if you want me to add you as maintainers.

It is not every day that we add a new C++ STL to conda-forge, so I'll briefly explain for those who aren't familiar with ongoing discussions why we want to add this. The standard practice for most package managers for languages with a shared standard library like C++ is to compile all packages with a single implementation to avoid ABI conflicts between packages. On Linux we use libstdc++ and on macOS we use libc++, which are the same as the standard libraries provided by those OSes.

Windows provides the MSVC C++ library, but historically it was only convenient to target this with the MSVC compiler (cl.exe) because the STL headers and import libraries were bundled with Visual Studio. We already use this for packages with MSVC compliant build systems, usually CMake and meson. However a great deal of open source software only provides a Unix compatible build system, which has led to the development of systems like MinGW, which provide a Unix-like environment and target libstdc++. In practice this has led to us using two different C++ ABIs, and this has been a source of increasing friction, along with the complexity of installing the MSVC toolchain for end users

Since 2019, the MSVC C++ STL has been available on github with an Apache-2.0 license, which gives us a new option: to package the STL ourselves and build our own Unix-compatible C++ toolchain with clang, the MinGW userspace tools and the MSVC C++ STL. The first step to building that is to add this recipe, but it would ultimately entail rebuilding all C++ shared libraries previously built against libstdc++ on Windows, along with any packages that link to them.

There are few obvious things for review here I'll highlight:

  • Overall naming: I chose the name msvcstl since it was simple, but I have no attachment to this name and I'm happy to change it to something better.

  • DLL naming: This is probably one of the more critical things to resolve. Right now we produce the same msvcp140*.dll files as are provided by the vc14_runtime feedstock. The default naming stategy in the upstream repo is to append _oss to the DLL names, which I changed to _conda here just to highlight the build flag that sets this. I think we have 3 choices here, and I'm not sure which of them is preferable:

  • - Use a suffix as I did here
    - Don't ship the DLLs at all in this package and rely on vc14_runtime to provide them
    - Ship the DLLs here and don't include them in vc14_runtime, presumably relying on this package to provide them instead
  • Boost vendoring: In the upstream repo, boost.math is a git submodule from a specific commit. I instead add the archive associated with that commit as another download source so that we can use source archives instead of git clones.

  • Package splitting: I followed the libcxx feedstock as closely as I could since it seemed most similar to what we want here, so i followed the choices there, but I'm not attached to them:

  • - Separate builds for the debug libraries, which have different file names from the regular libraries
    - Including the static libraries and import libraries with the DLLs
  • Testing: I copied the basic test files from the libcxx feedstock, except the tzdb file, since that seemed Linux-specific, and the .c example, since it seemed irrelevant here. The only significant change I made was to use the MSVC compiler for the tests instead of clang, since we use the MSVC compiler to actually build the library.
  • This is not a simple package so there may be things which I missed here! I have access to a native Windows machine where I did all the testing so I can examine things there if CI is insufficient.

    Diff: 483 lines (+362 / -121) across 6 files Reviewer: h-vetinari Review duration: 5318m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 483 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.370
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #35784"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%