Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling Additional Targets: Windows ARM #325

Closed
JP-Ellis opened this issue Sep 26, 2023 · 6 comments · Fixed by #370
Closed

Enabling Additional Targets: Windows ARM #325

JP-Ellis opened this issue Sep 26, 2023 · 6 comments · Fixed by #370

Comments

@JP-Ellis
Copy link
Contributor

JP-Ellis commented Sep 26, 2023

What appetite might there be to building additional targets supported by Rust? From my understanding, this should be somewhat straightforward to implement given Rust's cross-compilation abilities.

From the perspective of pact-python, the only limitation to supporting other platforms comes from the underlying library.

An interesting Python-backed-by-Rust project that could be worth looking at is ruff. In particular:

  • The list of targets supported on PyPI,
  • The list of targets supported on its release page
  • Its release workflow can be found here.

To avoid scrolling through the above, the list of targets is:

ruff-aarch64-apple-darwin.tar.gz
ruff-aarch64-pc-windows-msvc.zip
ruff-aarch64-unknown-linux-gnu.tar.gz
ruff-aarch64-unknown-linux-musl.tar.gz
ruff-armv7-unknown-linux-gnueabihf.tar.gz
ruff-armv7-unknown-linux-musleabihf.tar.gz
ruff-i686-pc-windows-msvc.zip
ruff-i686-unknown-linux-gnu.tar.gz
ruff-i686-unknown-linux-musl.tar.gz
ruff-powerpc64-unknown-linux-gnu.tar.gz
ruff-powerpc64le-unknown-linux-gnu.tar.gz
ruff-s390x-unknown-linux-gnu.tar.gz
ruff-x86_64-apple-darwin.tar.gz
ruff-x86_64-pc-windows-msvc.zip
ruff-x86_64-unknown-linux-gnu.tar.gz
ruff-x86_64-unknown-linux-musl.tar.gz

Happy to get an idea for the appetite on this first before looking at implementing this.

EDIT: A lot of the platforms above are rather legacy (powerpc, 32-bit windows and linux). The only two that stand out as being more common are:

  • armv7: which is used a lot on mobile phones (probably not worth addressing given the use case for Pact)
  • aarch64-pc-windows: this is the main one that is missing, and I would not be surprised if more ARM-based Windows platforms came up, following Apple's move to the ARM platform.
@rholshausen
Copy link
Contributor

The main issue is supporting these. If one of those targets stops working, who diagnoses and fixes the issues? We only want to support targets that people are actually using. For instance, Java just dropped support for 32 bit Windows in the latest version, so I don't see anyone else using those targets (for instance, any of i686 ones).

@JP-Ellis
Copy link
Contributor Author

Completely agree that adding support for platforms which are going out of support (powerpc, i686, etc.) probably is not be worth it.

I think the main one that is missing from the list is Windows ARM, which I don't think should be too difficult to add.

@YOU54F
Copy link
Member

YOU54F commented Sep 27, 2023

Building windows on arm for rust requires a workaround documented in this PR

https://github.com/pact-foundation/pact-reference/pull/276/files#diff-bde61993c1158b79f909f73f5d29986058a2f43bdc40ec770be49110774d3019R87

we've not had any requests for 32-bit versions of the ffi lib, of any flavour, nor any additional platforms (BSD's, powerpc64 / s390x)

I don't believe we have any CI hardware (or VM capabilities) to test powerpc64 / s390x. I built 32bit arm docker images for the pact-cli and pact-broker, and tested them out on a rasp pi 3 that I have on the shelf

I'm open to trying to build for every target - but without being able to test them, means we can't even tell if they even work, beyond building them.

If there are some ways to test powerpc64 / s390x locally or via CI, I'd be open to hear about it, but I don't think its a valuable use of our time, given the lack of demand.

(We've not had requests for arm64 windows flavours yet - It's only me who was interested in building aarch64 windows as I use a windows vm for x plat testing alot. Note the x86_64 binaries for rust and ruby are fine - albeit with some vcredist patches or a dev preview build for ruby)

@YOU54F
Copy link
Member

YOU54F commented Sep 27, 2023

The blocker for windows aarch64 is in ring v16.20 - there is a few tracking issues and a fix made by the community, which I've been testing and works great for me.

Relevant posts

@JP-Ellis
Copy link
Contributor Author

Good to know! I'll change the title of this issue to specifically address the Windows ARM build :)

@JP-Ellis JP-Ellis changed the title Enabling Additional Targets Enabling Additional Targets: Windows ARM Sep 27, 2023
@mefellows
Copy link
Member

We've had x86 requests on Windows before: pact-foundation/pact-net#448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants