diff --git a/.cargo/config.toml b/.cargo/config.toml index 0d426a9f6e2b5..f7d8e616f8622 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,10 @@ [alias] dev = "run --package ruff_dev --bin ruff_dev" benchmark = "bench -p ruff_benchmark --bench linter --bench formatter --" + +# 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"]