naggie / dsnet

FAST command to manage a centralised wireguard VPN. Think wg-quick but quicker: key generation + address allocation.
https://calbryant.uk/blog/how-to-set-up-a-wireguard-vpn-in-minutes-with-dsnet/
MIT License
673 stars 33 forks source link

armv8 #50

Closed sebdanielsson closed 3 years ago

sebdanielsson commented 3 years ago

Are there any plans for armv8 binaries? Tried to install this onto my odroid-n2 via AUR but said this software wasn't available for my architecture.

f-koehler commented 3 years ago

Hi @SebDanielsson, I created both of the packages in the AUR. I limited the architecture to x86_64 this I was only able to test it on that architecture yet. However, I do not see any reason why the code should not compile on ARMv8 as well (or any other platform targeted by the go compiler).

I updated the PKGBUILD in the AUR accordingly. Can you help me test and just try to install it again? Hopefully no modifications are necessary.

sebdanielsson commented 3 years ago

Was just about to try it but it seems AUR is having issues atm..😅

naggie commented 3 years ago

ARMv8 should be fine -- there is also a prebuilt binary for ARMv5: https://github.com/naggie/dsnet/releases/download/v0.5/dsnet-linux-arm5 which (I think) should work with ARMv8 too.

Else, indeed the AUR package which builds from scratch should now work thanks to @f-koehler .

sebdanielsson commented 3 years ago

It's now working great through the AUR, thanks😊

Would still be nice with a pre-built arm64 binary for the next release👍

naggie commented 3 years ago

That depends -- if the ARMv5 binary works in a 64 bit world then I'd say it's simpler/better to ship fewer binaries, as speed isn't a concern

f-koehler commented 3 years ago

ARM byte-code compatibility is not very straightforward according to my brief research just yet (see e.g. Wikipedia). However, when using the PKGBUILD from the AUR the code should get compiled for your current architecture. If not, then this would be a bug in the PKGBUILD which should be fixed.

Whether @naggie wants to have other builds as well is up to him. At some point one might think about creating a GitHub action to compile the code across multiple architectures when a release is drafted and automatically attach the build artifacts. But that would require quite some work.

naggie commented 3 years ago

In that case I'll add the binary next time I make a release. Let's leave this issue open for that.

Ideally I'd have github actions set up for CI as well as releases -- currently testing is manual which isn't ideal. It would make a great PR if someone gets time though :)

naggie commented 3 years ago

I've added an arm64 binary to the v0.6 release :+1: