Skip to content

Commit

Permalink
feat: add feature flag for generating rpc client
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasArrachea committed Feb 28, 2025
1 parent 9879a40 commit 277fd57
Show file tree
Hide file tree
Showing 3 changed files with 398 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/faucet/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use miden_node_proto::generated::{
requests::{
GetAccountDetailsRequest, GetBlockHeaderByNumberRequest, SubmitProvenTransactionRequest,
},
api_client::ApiClient,
rpc::api_client::ApiClient,
};
use miden_objects::{
account::{Account, AccountFile, AccountId, AuthSecretKey},
Expand Down
7 changes: 6 additions & 1 deletion crates/proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ fn main() -> anyhow::Result<()> {
prost_config.skip_debug(["AccountId", "Digest"]);

// Generate the stub of the user facing server from its proto file
#[cfg(feature = "rpc-client")]
let generate_rpc_server = true;
#[cfg(not(feature = "rpc-client"))]
let generate_rpc_server = false;

tonic_build::configure()
.build_client(false)
.build_client(generate_rpc_server)
.file_descriptor_set_path(&file_descriptor_path)
.skip_protoc_run()
.out_dir(&dst_dir)
Expand Down
Loading

0 comments on commit 277fd57

Please sign in to comment.