2 releases
new 0.1.1 | Feb 21, 2025 |
---|---|
0.1.0 | Feb 21, 2025 |
#131 in Simulation
Used in 4 crates
(3 directly)
48KB
423 lines
ODEM-rs Meta
odem-rs-meta
provides procedural macros to enhance the ODEM-rs simulation framework. It improves ergonomics during
model development by offering some compile-time code generation.
Macros
derive_config
: Derives theConfig
trait with optional attribute customization.control_expr
: Parses a condition into an awaitableControlExpr
used to model state-events.derive_publisher
: GeneratesPublisher
trait implementations for state-events.
License
Licensed under MIT. See LICENSE for details.
lib.rs
:
This crate provides procedural macros for meta-programming purposes to be used in concert with the ODEM-rs library.
It includes three main macros:
control_expr
: Parses a condition into aControlExpr
that can be awaited.derive_config
: Derives theConfig
trait for a structure, supporting customizations through attributes.derive_publisher
: Generates thePublisher
trait by subscribing to marked attributes.
For more details, refer to the documentation of each macro.
Dependencies
~1.3–2MB
~39K SLoC