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

Disable the default features of the tonic and tonic-build crates to allow downstream consumers to build in Wasm #1270

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-transport --path ../crates/zcash_client_backend
str4d marked this conversation as resolved.
Show resolved Hide resolved
- name: Copy pinned dependencies into synthetic crate
run: cp crates/Cargo.lock ci-build/
- name: Add target
Expand Down
152 changes: 104 additions & 48 deletions Cargo.lock
str4d marked this conversation as resolved.
Show resolved Hide resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ rayon = "1.5"

# Protobuf and gRPC
prost = "0.12"
tonic = "0.10"
tonic-build = "0.10"
tonic = { version = "0.10", default-features = false }
tonic-build = { version = "0.10", default-features = false }

# Secret management
secrecy = "0.8"
Expand Down
7 changes: 5 additions & 2 deletions zcash_client_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ tracing.workspace = true
# - Protobuf interfaces and gRPC bindings
hex.workspace = true
prost.workspace = true
tonic = { workspace = true, optional = true }
tonic = { workspace = true, optional = true, features = ["prost", "codegen"]}

# - Secret management
secrecy.workspace = true
Expand Down Expand Up @@ -102,7 +102,7 @@ crossbeam-channel.workspace = true
rayon.workspace = true

[build-dependencies]
tonic-build.workspace = true
tonic-build = { workspace = true, features = ["prost"]}
which = "4"

[dev-dependencies]
Expand All @@ -123,6 +123,9 @@ time = ">=0.3.22, <0.3.24" # time 0.3.24 has MSRV 1.67
## Enables the `tonic` gRPC client bindings for connecting to a `lightwalletd` server.
lightwalletd-tonic = ["dep:tonic"]

## Enables the `transport` feature of `tonic` producing a fully-featured client and server implementation
lightwalletd-tonic-transport = ["lightwalletd-tonic", "tonic?/transport"]

## Enables receiving transparent funds and shielding them.
transparent-inputs = [
"dep:hdwallet",
Expand Down
Loading
Loading