nx icon indicating copy to clipboard operation
nx copied to clipboard

Avoid Microsoft Visual C++ runtime dependency on Windows

Open tondrej opened this issue 2 years ago • 3 comments

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.

tondrej avatar Oct 22 '23 06:10 tondrej