Skip to content

Add support for targeting win-arm64 - #443

Closed
AArnott wants to merge 1 commit into
zingolabs:devfrom
nerdcash:win-arm64
Closed

Add support for targeting win-arm64#443
AArnott wants to merge 1 commit into
zingolabs:devfrom
nerdcash:win-arm64

Conversation

@AArnott

@AArnott AArnott commented Aug 19, 2023

Copy link
Copy Markdown
Contributor

The ring crate doesn't natively support win-arm64 yet. But a fork adds that support as described here.

  • Add support for building the aarch64-pc-windows-msvc.
  • Verify that building x86_64-pc-windows-msvc hasn't been broken.
  • Add a job to the GitHub workflow that runs in CI/PR to build Windows x64 and arm64 to demonstrate and keep it working.

@AArnott

AArnott commented Aug 19, 2023

Copy link
Copy Markdown
Contributor Author

Unfortunately, building cargo build --target x86_64-pc-windows-msvc with this change fails during linking with such as this:

libring-f96eea544d4a0e80.rlib(ring-f96eea544d4a0e80.ring.e6b10a1c-cgu.2.rcgu.o) : error LNK2001: unresolved external symbol ring_core_0_16_20_sha256_block_data_order

Ironically, the arm64 build is fine. But we can't merge this while it breaks win-x64 builds.

@codecov-commenter

codecov-commenter commented Aug 19, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: -0.07% ⚠️

Comparison is base (aed72a2) 59.79% compared to head (be4824d) 59.73%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #443      +/-   ##
==========================================
- Coverage   59.79%   59.73%   -0.07%     
==========================================
  Files          33       33              
  Lines        5412     5416       +4     
==========================================
- Hits         3236     3235       -1     
- Misses       2176     2181       +5     

see 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AloeareV

AloeareV commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

@AArnott is this still draft? It looks like a complete 1-line change that I'd be happy to merge

@AArnott

AArnott commented Sep 8, 2023

Copy link
Copy Markdown
Contributor Author

In my testing, this fixes win-arm64 builds but breaks win-x64 builds. So I'm surprised the PR checks didn't see that. We should confirm manually that it doesn't break local dev box builds, at least.

@AArnott

AArnott commented Sep 8, 2023

Copy link
Copy Markdown
Contributor Author

Also, it would make the PR more useful if it actually added a win-arm64 build to the CI to prove it works.

@AArnott

AArnott commented Sep 8, 2023

Copy link
Copy Markdown
Contributor Author

Oh ya... the CI doesn't even test building win-x64 right now. That's why it doesn't catch the problem with this PR as-is.
I'll update the PR description with a checklist.

The `ring` crate doesn't natively support win-arm64 yet. But a fork adds that support [as described here][workaround].

[workaround]: briansmith/ring#1514 (comment)
@juanky201271

Copy link
Copy Markdown
Contributor

@AArnott I see the 0.17.5, I'm trying to patch the ring crate in zingo-pc to this version to build in aarch64, but I realized that in zingolib there are several different versions of ring and I got an error in the patching... dis you try to build with the last version of ring?

@AArnott

AArnott commented Nov 12, 2023

Copy link
Copy Markdown
Contributor Author

The challenge with the latest version of ring with its win-arm64 support is that the version number changed in a more significant way that cargo patches are not allowed to cross. So we have to get every transitive path to ring to upgrade. I and some others have already started chasing these dependencies down. I haven't checked back on their progress for a few weeks though, so I guess I'll resume that.

@AArnott

AArnott commented Nov 12, 2023

Copy link
Copy Markdown
Contributor Author

cargo tree -i ring@0.16.20 is useful to find what needs to be upgraded.

jjyr/hdwallet#21 is one such upgrade that we're still waiting on.

@AArnott

AArnott commented Nov 12, 2023

Copy link
Copy Markdown
Contributor Author

I'm going to close this PR in favor of a new ones that takes the non-hacky approach (just updating dependencies as they are available to get to ring 0.17.)

@AArnott AArnott closed this Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants