From efdeef53fa5b8a525dcf41edc8d6240358eca243 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sat, 19 Aug 2023 11:03:50 -0600 Subject: [PATCH] Add support for targeting win-arm64 The `ring` crate doesn't natively support win-arm64 yet. But a fork adds that support [as described here][workaround]. [workaround]: https://github.com/briansmith/ring/issues/1514#issuecomment-1258562375 --- Cargo.lock | 14 +++++++++----- Cargo.toml | 3 +++ README.md | 4 ++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be03c4ee3..d5e6306e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1473,7 +1473,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -2465,15 +2465,13 @@ dependencies = [ [[package]] name = "ring" version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +source = "git+https://github.com/awakecoding/ring?branch=0.16.20_alpha#ec78aff5b5c4734957522f092590e0b58a3161cf" dependencies = [ "cc", "libc", "once_cell", - "spin", + "spin 0.9.8", "untrusted", - "web-sys", "winapi", ] @@ -2911,6 +2909,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index f9c9ab05a..b1cebaac8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,6 @@ debug = false [profile.test] opt-level = 3 debug = false + +[patch.crates-io] +ring = { git = "https://github.com/awakecoding/ring", branch = "0.16.20_alpha" } diff --git a/README.md b/README.md index 3bf129c50..f2251f52f 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,10 @@ cargo build --release This will launch the interactive prompt. Type `help` to get a list of commands. +## Library: +We currently depend on `ring` 0.17.0 for win-arm64 support, via cargo's patching mechanism. +Because patching only applies at the top level of a project, in order to use this library as a dependency, copy the `[patch.crates-io]` section of `Cargo.toml` into your own workspace `Cargo.toml` + ## Notes: * If you want to run your own server, please see [zingo lightwalletd](https://github.com/zingolabs/lightwalletd), and then run `./zingo-cli --server http://127.0.0.1:9067` * The default log file is in `~/.zcash/zingo-wallet.debug.log`. A default wallet is stored in `~/.zcash/zingo-wallet.dat`