From c0793cdb0176d6ba8da734bd537d7054dd7a7828 Mon Sep 17 00:00:00 2001 From: Martin Kysel Date: Mon, 21 Oct 2024 08:56:08 -0700 Subject: [PATCH] Fix Proto vs WASM (#1157) --- .github/workflows/test-webassembly.yml | 1 + xmtp_proto/buf.gen.yaml | 2 ++ xmtp_proto/src/gen/xmtp.xmtpv4.message_api.tonic.rs | 2 ++ xmtp_proto/src/gen/xmtp.xmtpv4.payer_api.tonic.rs | 2 ++ 4 files changed, 7 insertions(+) diff --git a/.github/workflows/test-webassembly.yml b/.github/workflows/test-webassembly.yml index dcfbf3c8b..c77c0a7c1 100644 --- a/.github/workflows/test-webassembly.yml +++ b/.github/workflows/test-webassembly.yml @@ -10,6 +10,7 @@ on: - "xmtp_mls/src/**" - "xmtp_id/src/**" - "xmtp_api_http/src/**" + - "xmtp_proto/**" - "Cargo.toml" - "Cargo.lock" - "rust-toolchain" diff --git a/xmtp_proto/buf.gen.yaml b/xmtp_proto/buf.gen.yaml index 4ca89dd90..c488b473f 100644 --- a/xmtp_proto/buf.gen.yaml +++ b/xmtp_proto/buf.gen.yaml @@ -27,6 +27,8 @@ plugins: - server_mod_attribute=xmtp.message_api.v1=#[cfg(not(target_arch = "wasm32"))] - server_mod_attribute=xmtp.mls.api.v1=#[cfg(not(target_arch = "wasm32"))] - server_mod_attribute=xmtp.xmtpv4=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.xmtpv4.payer_api=#[cfg(not(target_arch = "wasm32"))] + - server_mod_attribute=xmtp.xmtpv4.message_api=#[cfg(not(target_arch = "wasm32"))] - name: prost-crate out: . strategy: all diff --git a/xmtp_proto/src/gen/xmtp.xmtpv4.message_api.tonic.rs b/xmtp_proto/src/gen/xmtp.xmtpv4.message_api.tonic.rs index 6e236b624..3d5817bd7 100644 --- a/xmtp_proto/src/gen/xmtp.xmtpv4.message_api.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.xmtpv4.message_api.tonic.rs @@ -1,5 +1,6 @@ // @generated /// Generated client implementations. +#[cfg(not(target_arch = "wasm32"))] pub mod replication_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -217,6 +218,7 @@ pub mod replication_api_client { } } /// Generated server implementations. +#[cfg(not(target_arch = "wasm32"))] pub mod replication_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; diff --git a/xmtp_proto/src/gen/xmtp.xmtpv4.payer_api.tonic.rs b/xmtp_proto/src/gen/xmtp.xmtpv4.payer_api.tonic.rs index 65aebcf99..db9b4d117 100644 --- a/xmtp_proto/src/gen/xmtp.xmtpv4.payer_api.tonic.rs +++ b/xmtp_proto/src/gen/xmtp.xmtpv4.payer_api.tonic.rs @@ -1,5 +1,6 @@ // @generated /// Generated client implementations. +#[cfg(not(target_arch = "wasm32"))] pub mod payer_api_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; @@ -121,6 +122,7 @@ pub mod payer_api_client { } } /// Generated server implementations. +#[cfg(not(target_arch = "wasm32"))] pub mod payer_api_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*;