index : static-web-server.git

ascending towards madness

author Jose Quintana <1700322+joseluisq@users.noreply.github.com> 2023-11-13 1:41:44.0 +00:00:00
committer GitHub <noreply@github.com> 2023-11-13 1:41:44.0 +00:00:00
commit
990bb7c8d92a7cb06156c287e02e42077ec45842 [patch]
tree
de200c22e57df5f9406f5e925098ffdf3d96fabe
parent
f4e914250e222ad1593968ba60aefa83120da190
download
990bb7c8d92a7cb06156c287e02e42077ec45842.tar.gz

refactor: statically link the c runtime for windows msvc x86 (#291)

i686 (before)
$ ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffc41ff0000)
        ntdll.dll => /c/Windows/SyChpe32/ntdll.dll (0x77700000)
        wow64.dll => /c/Windows/System32/wow64.dll (0x7ffc3fa80000)
        wow64base.dll => /c/Windows/System32/wow64base.dll (0x7ffc3e800000)
        wow64win.dll => /c/Windows/System32/wow64win.dll (0x7ffc3f5d0000)
        wow64con.dll => /c/Windows/System32/wow64con.dll (0x7ffc3fe50000)

i686 (after)
$ ldd static-web-server.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffe74db0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffe73990000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffe72b10000)
        advapi32.dll => /c/Windows/System32/advapi32.dll (0x7ffe72f30000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffe74580000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffe74b80000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffe74450000)
        ws2_32.dll => /c/Windows/System32/ws2_32.dll (0x7ffe74c20000)
        bcrypt.dll => /c/Windows/System32/bcrypt.dll (0x7ffe72ae0000)
        CRYPTBASE.DLL => /c/Windows/SYSTEM32/CRYPTBASE.DLL (0x7ffe71d70000)

Diff

 .cargo/config.toml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.cargo/config.toml b/.cargo/config.toml
index ce61f87..5d51715 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -7,3 +7,5 @@ protocol = "sparse"
rustflags = ["-C", "target-feature=+crt-static"]
[target.aarch64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "link-arg=libvcruntime.lib"]