添加thunk-rs链接Windows 7兼容库

This commit is contained in:
VNT-[bot]
2025-04-26 10:15:27 +08:00
parent 04b60773b9
commit 8d39d6045a
4 changed files with 16 additions and 1 deletions
+3
View File
@@ -9,6 +9,9 @@ common = { path = "../common", default-features = false }
tokio = { version = "1.37.0", features = ["full"] }
log = "0.4.17"
[target.'cfg(windows)'.build-dependencies]
thunk-rs = { version = "0.3.3", features = ["win7"] }
[features]
default = ["default-feature"]
default-feature = ["server_encrypt", "aes_gcm", "aes_cbc", "aes_ecb", "sm4_cbc", "chacha20_poly1305", "port_mapping", "log", "command", "file_config", "lz4", "ws"]
+6
View File
@@ -0,0 +1,6 @@
fn main() {
// 配置 thunk-rs 来链接 Windows 7 兼容库,并自动设置链接参数
#[cfg(target_os = "windows")]
thunk::thunk();
}
+4 -1
View File
@@ -19,6 +19,9 @@ signal-hook = "0.3.17"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3.9", features = ["handleapi", "processthreadsapi", "winnt", "securitybaseapi", "impl-default"] }
[target.'cfg(windows)'.build-dependencies]
thunk-rs = { version = "0.3.3", features = ["win7"] }
[features]
default = ["default-feature"]
default-feature = ["server_encrypt", "aes_gcm", "aes_cbc", "aes_ecb", "sm4_cbc", "chacha20_poly1305", "ip_proxy", "port_mapping", "log", "command", "file_config", "lz4", "ws"]
@@ -44,4 +47,4 @@ command = ["common/command"]
file_config = ["common/file_config"]
[build-dependencies]
rand = "0.8.5"
chrono = "0.4.23"
chrono = "0.4.23"
+3
View File
@@ -1,6 +1,9 @@
use cfg_aliases::cfg_aliases;
fn main() {
#[cfg(target_os = "windows")]
thunk::thunk();
cfg_aliases! {
cipher: {
any(feature = "aes_gcm",