3 unstable releases
Uses new Rust 2024
| 0.2.0 | Jun 20, 2025 |
|---|---|
| 0.1.1 | Feb 21, 2025 |
| 0.1.0 | Feb 21, 2025 |
#157 in Simulation
185 downloads per month
Used in odem-rs
505KB
8K
SLoC
ODEM-rs Sync
odem-rs-sync provides synchronization primitives and communication structures for agent-job interactions in
ODEM-rs simulations.
Features
- Internal cooperative concurrency by extending simulation contexts with forking.
- MPMC channels to connect agents.
- Control expressions allow modeling state-events in addition to the standard time-events provided by the scheduler.
- A GPSS-inspired facility to model exclusive resources.
Dynamically sized backing stores for the channels require the alloc-feature. Channels themselves can either be created
on the heap using a free channel-function like in Rust's standard library which requires alloc as well, or pinned on
the stack for the no_std solution. Everything else is no_std.
Installation
This crate is meant as a dependency to the odem-rs entry crate, but it is possible to use it in combination
with the simulator core defined in the odem-rs-code crate. To install, add the following line to your Cargo.toml.
[dependencies]
odem-rs-sync = "*"
License
Licensed under MIT. See LICENSE for details.
Dependencies
~5–7MB
~153K SLoC