From 7623cf176708b597b80204ba77fcecdd73bda923 Mon Sep 17 00:00:00 2001 From: Guillaume Hetier Date: Mon, 9 Mar 2026 13:34:17 -0700 Subject: [PATCH 1/2] Add rust build link dependencies --- scripts/build.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/build.rs b/scripts/build.rs index 0cbb348619..be208e395a 100644 --- a/scripts/build.rs +++ b/scripts/build.rs @@ -90,6 +90,26 @@ fn cmake_build() { } else if cfg!(target_os = "macos") { println!("cargo:rustc-link-lib=framework=CoreFoundation"); println!("cargo:rustc-link-lib=framework=Security"); + } else if cfg!(windows) { + // Windows system libraries that the static msquic.lib depends on. + // These are excluded from the monolithic archive (via the inc/base_link + // EXCLUDE_LIST in CMake) and must be linked explicitly by the consumer. + for lib in [ + "ws2_32", + "ntdll", + "bcrypt", + "ncrypt", + "crypt32", + "iphlpapi", + "advapi32", + "schannel", + ] { + println!("cargo:rustc-link-lib={lib}"); + } + if cfg!(feature = "openssl") || cfg!(feature = "quictls") { + // OpenSSL references user32 symbols (MessageBoxW, etc.) + println!("cargo:rustc-link-lib=user32"); + } } } } From c2c6df15783191d8fcb8b597f78e0067667f7995 Mon Sep 17 00:00:00 2001 From: Guillaume Hetier Date: Mon, 9 Mar 2026 13:37:46 -0700 Subject: [PATCH 2/2] Format --- scripts/build.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/build.rs b/scripts/build.rs index be208e395a..acbab0ebe6 100644 --- a/scripts/build.rs +++ b/scripts/build.rs @@ -95,13 +95,7 @@ fn cmake_build() { // These are excluded from the monolithic archive (via the inc/base_link // EXCLUDE_LIST in CMake) and must be linked explicitly by the consumer. for lib in [ - "ws2_32", - "ntdll", - "bcrypt", - "ncrypt", - "crypt32", - "iphlpapi", - "advapi32", + "ws2_32", "ntdll", "bcrypt", "ncrypt", "crypt32", "iphlpapi", "advapi32", "schannel", ] { println!("cargo:rustc-link-lib={lib}");