Skip to main content

iota_multiaddr/
lib.rs

1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2026 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5//! `Multiaddr` wrapper for IOTA.
6//!
7//! The public API differs by target. On wasm32 only the parts needed to
8//! type-check and serialize on-chain validator metadata are available; the
9//! address-parsing and networking helpers are native-only, since they pull in
10//! dependencies that do not build for wasm. The `wasm` module documents what
11//! the wasm build provides and why.
12
13#[cfg(not(target_arch = "wasm32"))]
14mod native;
15#[cfg(target_arch = "wasm32")]
16mod wasm;
17
18#[cfg(not(target_arch = "wasm32"))]
19pub use native::*;
20#[cfg(target_arch = "wasm32")]
21pub use wasm::*;