iota_common/lib.rs
1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5#[cfg(not(target_arch = "wasm32"))]
6pub mod backoff;
7pub mod logging;
8pub mod moving_window;
9pub mod random;
10#[cfg(not(target_arch = "wasm32"))]
11pub mod random_util;
12#[cfg(not(target_arch = "wasm32"))]
13pub mod stream_ext;
14#[cfg(not(target_arch = "wasm32"))]
15pub mod sync;
16pub mod try_iterator_ext;
17#[cfg(not(target_arch = "wasm32"))]
18pub use random_util::tempdir;
19
20#[inline(always)]
21pub fn in_test_configuration() -> bool {
22 cfg!(msim) || cfg!(debug_assertions)
23}