iota_swarm/memory/mod.rs
1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5//! An `in-memory`, or rather `in-process`, backend for building and managing
6//! IOTA Networks that all run inside the same process. Nodes are isolated from
7//! one another by each being run on their own separate thread within their own
8//! `tokio` runtime. This enables the ability to properly shut down a single
9//! node and ensure that all of its running tasks are also shut down, something
10//! that is extremely difficult or down right impossible to do if all the nodes
11//! are running on the same runtime.
12
13mod node;
14pub use node::{Node, RuntimeType};
15
16mod swarm;
17pub use swarm::{Swarm, SwarmBuilder};
18
19#[cfg(msim)]
20#[path = "./container-sim.rs"]
21mod container;
22
23#[cfg(not(msim))]
24#[path = "./container.rs"]
25mod container;