nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
22.64k stars 2.26k forks source link

Avoid Microsoft Visual C++ runtime dependency on Windows #19779

Open tondrej opened 8 months ago

tondrej commented 8 months ago

Description

When targeting Windows the resulting binary (nx.dll) dynamically links against Microsoft Visual C++ runtime (msvcrt140.dll). This means nx won't be able to run on Windows systems without this runtime installed. I'd like to avoid this dependency by linking the runtime statically into the nx binary. (This is also how e.g. cargo.exe for Windows is built.)

Motivation

The Visual C++ runtime is not installed by default on Windows. Most Windows base container images used in CI build pipelines don't include it. It's an extra step to download and install the runtime. Avoiding this extra step would make it easier to use nx on Windows.

Suggested Implementation

static_vcruntime can be used for this.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏

Cammisuli commented 2 months ago

Im still interested in looking into this. Not stale.