Skip to content

Commit 50d8f12

Browse files
authored
Support AMD64 and ARM64 DLLs on Windows (#124)
1 parent 41e1bc3 commit 50d8f12

3 files changed

Lines changed: 37 additions & 34 deletions

File tree

Cargo.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "defguard_wireguard_rs"
3-
version = "0.9.2"
3+
version = "0.9.3"
44
edition = "2024"
55
rust-version = "1.87"
66
description = "A unified multi-platform high-level API for managing WireGuard interfaces"
@@ -44,7 +44,7 @@ wireguard-nt = "0.5"
4444
[target.'cfg(target_os = "linux")'.dependencies]
4545
netlink-packet-core = "0.8"
4646
netlink-packet-generic = "0.4"
47-
netlink-packet-route = "0.28"
47+
netlink-packet-route = "0.29"
4848
netlink-packet-utils = "0.6"
4949
netlink-packet-wireguard = "0.3"
5050
netlink-sys = "0.8"

src/wgapi_windows.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ use crate::{
3939
wgapi::{Kernel, WGApi},
4040
};
4141

42-
static WIREGUARD_DLL_PATH: &str = "resources-windows/binaries/wireguard.dll";
42+
#[cfg(target_arch = "aarch64")]
43+
const WIREGUARD_DLL_PATH: &str = "resources-windows/binaries/wireguard-arm64.dll";
44+
#[cfg(target_arch = "x86_64")]
45+
const WIREGUARD_DLL_PATH: &str = "resources-windows/binaries/wireguard-amd64.dll";
4346
// Load wireguard.dll. Unsafe because we are loading an arbitrary dll file.
4447
static WIREGUARD_DLL: LazyLock<Mutex<Wireguard>> = LazyLock::new(|| {
4548
Mutex::new(

0 commit comments

Comments
 (0)