depot/third_party/tvl/users/tazjin/finito
Default email c4fb0432ae Project import generated by Copybara.
GitOrigin-RevId: 3fc1143a04da49a92c3663813c6a0c1e8ccd477f
2020-09-29 23:42:59 -04:00
..
finito-core Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
finito-door Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
finito-postgres Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
.gitignore Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
Cargo.lock Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
Cargo.toml Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
default.nix Project import generated by Copybara. 2020-09-29 23:42:59 -04:00
README.md Project import generated by Copybara. 2020-09-29 23:42:59 -04:00

Finito

This is a Rust port of the Haskell state-machine library Finito. It is slightly less featureful because it loses the ability to ensure that side-effects are contained and because of a slight reduction in expressivity, which makes it a bit more restrictive.

However, it still implements the FSM model well enough.

Components

Finito is split up into multiple independent components (note: not all of these exist yet), separating functionality related to FSM persistence from other things.

  • finito: Core abstraction implemented by Finito
  • finito-door: Example implementation of a simple, lockable door
  • finito-postgres: Persistent state-machines using Postgres

Note: The finito core library does not contain any tests. Its coverage is instead provided by the finito-door library, which actually implements an example FSM.

These are split out because the documentation for finito-door is interesting regardless and because other Finito packages also need an example implementation.