Skip to content

Banish v1.2.3

Choose a tag to compare

@LoganFlaherty LoganFlaherty released this 09 Mar 05:34
· 57 commits to main since this release
b8581ed

v1.2.3

New

Hey everyone sorry for the quick releases just had some immediate improvement ideas and urgent bugs to deal with.
max_entry = N => @state
max_entry now accepts an optional redirect target, matching the existing max_iter = N => @state syntax. On the (N+1)th entry the machine transitions to the named state instead of returning.

#[max_entry = 3 => @done]
@step
    work? { process(); }
    next? { => @step; }

#[isolate]
@done
    finish? { println!("max entries reached"); return; }

Isolated states still require a rule-level exit (return, => @state, or max_iter = N => @state) alongside this attribute. The redirect only fires on the (N+1)th entry and does not cover entries 1 through N.

Docs

  • break and continue are now documented. Both work natively inside rule bodies against the generated fixed-point loop — break exits the current state and lets the scheduler advance, continue restarts rule evaluation from the top.
  • Reference and crate docs updated to reflect all of the above.

Also released: v1.2.1 / v1.2.2

trace now emits via [log](https://docs.rs/log)
The trace attribute previously wrote directly to stderr with eprintln!. It now emits through the log facade using log::trace!, giving you full control over where the output goes and how it's formatted. log is re-exported from banish directly so no additional dependency is needed.

If you use #[trace] and were relying on stderr output, initialize a log backend — see the [tracing docs](https://github.com/LoganFlaherty/banish/blob/main/docs/reference.md#trace) for setup instructions. Everything else is unchanged.