dscale 0.7.1

A fast & deterministic simulation framework for benchmarking and testing distributed systems
Documentation
// DScale: deterministic distributed systems simulator
// Copyright (C) 2026  Konstantin Shprenger

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

//! Deterministic & fast simulation framework for distributed systems.
//!
//! DScale provides a single-threaded or parallel, event-driven simulation engine
//! that models network latency, bandwidth constraints, and process execution.
//! Simulations are fully deterministic when seeded, making them reproducible
//! for testing and benchmarking.
//!
//! The main workflow:
//! 1. Define messages implementing [`Message`].
//! 2. Implement [`Process`] for your process logic.
//! 3. Configure the simulation with [`SimulationBuilder`].
//! 4. Call `run_X()` on the result of [`SimulationBuilder::build`].

mod alloc;
mod destination;
mod events;
/// Helper utilities for simulation processes.
pub mod helpers;
mod jiffy;
mod message;
mod network;
mod process;
mod random;
mod runners;
/// Services to use with simulation: key-value store, process interaction, uid generator.
pub mod services;
mod sim_builder;
mod sim_flavor;
mod timer;
mod topology;

pub use log;
pub use rand;

pub use message::Message;
pub use message::MessagePtr;

pub use process::Pid;
pub use process::Process;

pub use sim_builder::SimulationBuilder;

pub use services::broadcast;
pub use services::broadcast_within_pool;
pub use services::choose_from_pool;
pub use services::list_pool;
pub use services::now;
pub use services::pid;
pub use services::schedule_timer_after;
pub use services::send_random;
pub use services::send_random_from_pool;
pub use services::send_to;
pub use services::unique_id;

pub use network::BandwidthConfig;

pub use topology::GLOBAL_POOL;

pub use random::Distr;
pub use random::Seed;

pub use jiffy::Jiffies;
pub use runners::CompleteStatus;
pub use runners::SimulationRunner;
pub use runners::scalable::ThreadNumber;
pub use timer::TimerId;