Update Gateway types based on target architecture

and feature
This commit is contained in:
bitfl0wer 2023-11-18 20:02:34 +01:00
parent 287b72c99c
commit f1e3058346
1 changed files with 10 additions and 0 deletions

View File

@ -19,11 +19,21 @@ compile_error!("feature \"rt\" and feature \"rt_multi_thread\" cannot be enabled
#[cfg(all(not(target_arch = "wasm32"), feature = "client"))]
pub type Gateway = DefaultGateway;
#[cfg(all(target_arch = "wasm32", feature = "client"))]
pub type Gateway = WasmGateway;
#[cfg(all(not(target_arch = "wasm32"), feature = "client"))]
pub type GatewayHandle = DefaultGatewayHandle;
#[cfg(all(target_arch = "wasm32", feature = "client"))]
pub type GatewayHandle = WasmGatewayHandle;
#[cfg(all(not(target_arch = "wasm32"), feature = "client"))]
use gateway::DefaultGateway;
#[cfg(all(not(target_arch = "wasm32"), feature = "client"))]
use gateway::DefaultGatewayHandle;
#[cfg(all(target_arch = "wasm32", feature = "client"))]
use gateway::WasmGateway;
#[cfg(all(target_arch = "wasm32", feature = "client"))]
use gateway::WasmGatewayHandle;
use url::{ParseError, Url};
#[cfg(feature = "client")]