From 1b769b054c6de5de914c547d7784ecd8e3280802 Mon Sep 17 00:00:00 2001 From: T-256 <132141463+T-256@users.noreply.github.com> Date: Mon, 3 Jun 2024 10:48:07 +0330 Subject: [PATCH] Windows: Statically linked C runtime (#3966) --- .cargo/config.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 689580aad..9c7d3a758 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,9 @@ [alias] dev = "run --package uv-dev" + +# statically link the C runtime so the executable does not depend on +# that shared/dynamic library. +# +# See: https://github.com/astral-sh/ruff/issues/11503 +[target.'cfg(all(target_env = "msvc", target_os = "windows"))'] +rustflags = ["-C", "target-feature=+crt-static"]