62674ce919
- Add pezkuwi-subxt crates to vendor/pezkuwi-subxt - Add pezkuwi-zombienet-sdk crates to vendor/pezkuwi-zombienet-sdk - Convert git dependencies to path dependencies - Add vendor crates to workspace members - Remove test/example crates from vendor (not needed for SDK) - Fix feature propagation issues detected by zepter - Fix workspace inheritance for internal dependencies - All 606 crates now in workspace - All 6919 internal dependency links verified correct - No git dependencies remaining
38 lines
878 B
Rust
38 lines
878 B
Rust
// Copyright 2019-2025 Parity Technologies (UK) Ltd.
|
|
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
|
// see LICENSE for license details.
|
|
|
|
//! Default platform for WASM environments.
|
|
|
|
#[cfg(feature = "web")]
|
|
mod wasm_helpers;
|
|
#[cfg(feature = "web")]
|
|
mod wasm_platform;
|
|
#[cfg(feature = "web")]
|
|
mod wasm_socket;
|
|
|
|
pub use helpers::{DefaultPlatform, build_platform};
|
|
|
|
#[cfg(feature = "native")]
|
|
mod helpers {
|
|
use smoldot_light::platform::default::DefaultPlatform as Platform;
|
|
use std::sync::Arc;
|
|
|
|
pub type DefaultPlatform = Arc<Platform>;
|
|
|
|
pub fn build_platform() -> DefaultPlatform {
|
|
Platform::new("subxt-light-client".into(), env!("CARGO_PKG_VERSION").into())
|
|
}
|
|
}
|
|
|
|
#[cfg(feature = "web")]
|
|
mod helpers {
|
|
use super::wasm_platform::SubxtPlatform as Platform;
|
|
|
|
pub type DefaultPlatform = Platform;
|
|
|
|
pub fn build_platform() -> DefaultPlatform {
|
|
Platform::new()
|
|
}
|
|
}
|