Skip to content

Bastion v0.3.0

Compare
Choose a tag to compare
@r3v2d0g r3v2d0g released this 13 Nov 15:15
· 256 commits to master since this release
d15e163

Getting Started | Examples | API documentation

Bastion 0.3.0 is here, and it is a huge milestone for the project.

Features were added, the API was upgraded, the code was cleaned up, bugs were smashed but
most importantly, Bastion is more powerful than it has ever been.

Don't forget to check out our examples directory and especially getting_started.rs

What's new

  • Bastion uses std::future::Future.
  • Children execute a std::future::Future with Result<(), ()> as an output to
    indicate whether they stopped or faulted.
  • Messages can be sent to children directly, which can receive and eventually answer to
    them (using msg! and answer!).
  • Messages can be broadcasted to the whole system, a supervisor's supervised elements
    or a children group's elements (using Bastion, SupervisorRef and ChildrenRef).
  • The system, supervisors, children groups and children can be stopped or killed remotely
    (using Bastion, SupervisorRef, ChildrenRef and ChildRef).
  • Supervisors can supervise others supervisors (they can still supervise children groups
    when doing so).
  • Supervisors can get asked to supervise new children groups and supervisors after being
    created (using SupervisorRef).
  • Supervisors' supervision strategy can be changed after being created (using
    SupervisorRef).
  • Callbacks can be defined for children groups and supervisors to execute code on some
    of their lifecycle events (before_start, before_restart, after_restart and
    after_stop).
  • Children contexts allow to access the child, children group or supervisor (using
    .current(), .parent() or .supervisor()).
  • Bastion uses its own executor (bastion-executor) and processes abstraction
    (lightproc).
  • Bastion supports using a NUMA-aware allocator (with a fallback on systems not
    supporting it) via the unstable feature.