Disable the default features of the tonic and tonic-build crates to allow downstream consumers to build in Wasm#1270
Conversation
|
Also, in addition to making the above change, add the following change to diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6263019a6..ebf418cfe 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -195,7 +195,7 @@ jobs:
run: cargo add --no-default-features --path ../crates/zcash_proofs
- name: Add zcash_client_backend as a dependency of the synthetic crate
working-directory: ./ci-build
- run: cargo add --no-default-features --path ../crates/zcash_client_backend
+ run: cargo add --features lightwalletd-tonic --path ../crates/zcash_client_backend
- name: Copy pinned dependencies into synthetic crate
run: cp crates/Cargo.lock ci-build/
- name: Add target |
|
Thanks for the review @str4d ! I moved the impl of I think this makes more sense as it it feels a little weird to have the API change depending on the build target. Instead builds will fail if the feature is enabled and then Wasm builds can disable it to have it work. I think more useful information is communicated this way. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1270 +/- ##
==========================================
- Coverage 63.55% 63.42% -0.13%
==========================================
Files 121 121
Lines 13661 13705 +44
==========================================
+ Hits 8682 8693 +11
- Misses 4979 5012 +33 ☔ View full report in Codecov by Sentry. |
Closes #1269
Note this regenerates the code-generated
proto/service.rsfile and the newer version is included in this PR. This is a minor change to thezcash_client_backendpublic API as these are exposed.