Skip to content

Commit 097997e

Browse files
committed
fix(windows): statically link MSVC CRT to fix missing vcruntime140.dll issue
1 parent 98817bb commit 097997e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.cargo/config.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
2+
# not depend on the vcruntime DLL.
3+
[target.x86_64-pc-windows-msvc]
4+
rustflags = ["-C", "target-feature=+crt-static"]
5+
[target.i686-pc-windows-msvc]
6+
rustflags = ["-C", "target-feature=+crt-static"]
7+
[target.aarch64-pc-windows-msvc]
8+
rustflags = ["-C", "target-feature=+crt-static"]

0 commit comments

Comments
 (0)