This is simply a small release that adds two things:
- Added a no_std attribute in the source code of banish to ensure compatibility with no_std environments.
- Added pattern matching in rule conditionals such as
rule ? let Some(data) = queue.pop() { ... }.
Patch v1.4.1:
- Refined documentation.
Other recent changes:
- Block Attributes
#![...]added to configure the entire state machine in one place. - Async support introduced via
#![async], enabling runtime-agnostic .await usage inside rule bodies. - Runtime dispatch
#![dispatch(expr)]added to dynamically set the starting state using an enum variant. - BanishDispatch derive macro implemented to map PascalCase enum variants to snake_case state names automatically.
- Transition guards
=> @state if condition;added to allow inline conditional jumps. - Scoped variable declarations added, supporting block-level (lifetime of machine) and state-level (reset on entry) scopes.
- #[banish::machine] macro introduced to automatically handle async boilerplate and ID assignment.
- Block-level tracing
#![trace]added to enable global diagnostics with machine ID labeling. banish::init_traceadded via the trace-logger feature to easily route diagnostics to stderr or a file.- Fixed a bug where the machine would incorrectly enter an isolated state on startup.
- Fixed a validation bug where nested returns were not recognized.
- Fixed a bug (v1.3.1) where acronym enums would not convert as intended.