From 0b02e42d34933de782832d6e8ce0dc2c36abf747 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Tue, 11 Feb 2025 12:20:04 -0500 Subject: [PATCH] Add support for arm64 windows builds (#120) This is thanks to the new work on cargo-xwin (https://github.com/rust-cross/cargo-xwin/issues/76) that enables Clang as a cross-compiler, allowing ring and rustls to build on ARM64 Windows. --- README.md | 4 ++-- scripts/release.sh | 5 ++--- src/routes/+page.svelte | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 71d32c3..39af2d0 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ curl -sSf https://sshx.io/get | sh Supports Linux and MacOS on x86_64 and ARM64 architectures, as well as embedded ARMv6 and ARMv7-A systems. The Linux binaries are statically linked. -For Windows, there are binaries for x86_64 and x86, linked to MSVC for maximum -compatibility. +For Windows, there are binaries for x86_64, x86, and ARM64, linked to MSVC for +maximum compatibility. If you just want to try it out without installing, use: diff --git a/scripts/release.sh b/scripts/release.sh index fb963c6..592e244 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -41,8 +41,7 @@ cross build --release --target x86_64-unknown-freebsd # *-pc-windows-msvc: for Windows, requires cargo-xwin XWIN_ARCH=x86,x86_64,aarch64 cargo xwin build -p sshx --release --target x86_64-pc-windows-msvc XWIN_ARCH=x86,x86_64,aarch64 cargo xwin build -p sshx --release --target i686-pc-windows-msvc -# Does not work, see https://github.com/rust-cross/cargo-xwin/issues/76 -# XWIN_ARCH=x86,x86_64,aarch64 cargo xwin build -p sshx --release --target aarch64-pc-windows-msvc +XWIN_ARCH=x86,x86_64,aarch64 cargo xwin build -p sshx --release --target aarch64-pc-windows-msvc --cross-compiler clang temp=$(mktemp) targets=( @@ -55,7 +54,7 @@ targets=( x86_64-unknown-freebsd x86_64-pc-windows-msvc i686-pc-windows-msvc - # aarch64-pc-windows-msvc + aarch64-pc-windows-msvc ) for target in "${targets[@]}" do diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index cb3f600..f2dc6eb 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -223,10 +223,10 @@ href="https://sshx.s3.amazonaws.com/sshx-i686-pc-windows-msvc.zip" >Windows x86 - + >