Fix building on Windows ARM64 (#485)

Tested building natively on Windows ARM64, with Rust 1.82 and VS2022 toolchains.
Basic functionality of easytier-cli, easytier-core and easytier-web has been verified.
This commit is contained in:
Sophon
2024-11-21 10:32:03 +08:00
committed by GitHub
parent aed54f7318
commit bc7c4d8cd0
6 changed files with 21 additions and 43 deletions

57
Cargo.lock generated
View File

@@ -776,9 +776,9 @@ dependencies = [
"nix 0.25.1",
"parking_lot",
"rand_core 0.6.4",
"ring 0.17.8",
"ring",
"tracing",
"untrusted 0.9.0",
"untrusted",
"x25519-dalek",
]
@@ -1884,7 +1884,7 @@ dependencies = [
"rcgen",
"regex",
"reqwest 0.11.27",
"ring 0.17.8",
"ring",
"ringbuf",
"rstest",
"rust-i18n",
@@ -2262,7 +2262,7 @@ checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
dependencies = [
"futures-core",
"futures-sink",
"spin 0.9.8",
"spin",
]
[[package]]
@@ -3545,7 +3545,7 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
dependencies = [
"spin 0.9.8",
"spin",
]
[[package]]
@@ -5375,7 +5375,7 @@ checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd"
dependencies = [
"bytes",
"rand 0.8.5",
"ring 0.17.8",
"ring",
"rustc-hash",
"rustls",
"rustls-platform-verifier",
@@ -5537,12 +5537,12 @@ dependencies = [
[[package]]
name = "rcgen"
version = "0.11.3"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6"
checksum = "48406db8ac1f3cbc7dcdb56ec355343817958a356ff430259bb07baf7607e1e1"
dependencies = [
"pem",
"ring 0.16.20",
"ring",
"time",
"yasna",
]
@@ -5703,21 +5703,6 @@ dependencies = [
"winreg 0.52.0",
]
[[package]]
name = "ring"
version = "0.16.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
dependencies = [
"cc",
"libc",
"once_cell",
"spin 0.5.2",
"untrusted 0.7.1",
"web-sys",
"winapi",
]
[[package]]
name = "ring"
version = "0.17.8"
@@ -5728,8 +5713,8 @@ dependencies = [
"cfg-if",
"getrandom 0.2.15",
"libc",
"spin 0.9.8",
"untrusted 0.9.0",
"spin",
"untrusted",
"windows-sys 0.52.0",
]
@@ -5987,7 +5972,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044"
dependencies = [
"once_cell",
"ring 0.17.8",
"ring",
"rustls-pki-types",
"rustls-webpki",
"subtle",
@@ -6065,9 +6050,9 @@ version = "0.102.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e"
dependencies = [
"ring 0.17.8",
"ring",
"rustls-pki-types",
"untrusted 0.9.0",
"untrusted",
]
[[package]]
@@ -6799,12 +6784,6 @@ dependencies = [
"system-deps",
]
[[package]]
name = "spin"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
name = "spin"
version = "0.9.8"
@@ -7927,7 +7906,7 @@ dependencies = [
"futures-sink",
"http 1.1.0",
"httparse",
"ring 0.17.8",
"ring",
"rustls-pki-types",
"tokio",
"tokio-rustls",
@@ -8471,12 +8450,6 @@ dependencies = [
"subtle",
]
[[package]]
name = "untrusted"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "untrusted"
version = "0.9.0"

View File

@@ -69,7 +69,7 @@ quinn = { version = "0.11.0", optional = true, features = ["ring"] }
rustls = { version = "0.23.0", features = [
"ring",
], default-features = false, optional = true }
rcgen = { version = "0.11.1", optional = true }
rcgen = { version = "0.12.1", optional = true }
# for websocket
tokio-websockets = { version = "0.8", optional = true, features = [

View File

@@ -67,7 +67,12 @@ impl WindowsBuild {
pub fn check_for_win() {
// add third_party dir to link search path
#[cfg(target_arch = "x86_64")]
println!("cargo:rustc-link-search=native=easytier/third_party/");
#[cfg(target_arch = "aarch64")]
println!("cargo:rustc-link-search=native=easytier/third_party/arm64/");
let protoc_path = if let Some(o) = Self::check_protoc_exist() {
println!("cargo:info=use os exist protoc: {:?}", o);
o

BIN
easytier/third_party/arm64/Packet.dll vendored Normal file

Binary file not shown.

BIN
easytier/third_party/arm64/Packet.lib vendored Normal file

Binary file not shown.

BIN
easytier/third_party/arm64/wintun.dll vendored Normal file

Binary file not shown.