Universal State Management
StateForward transcends language barriers, bringing clarity and structure to your projects, be it in Python, JavaScript, or beyond.
$ pip install stateforward
See it in action!
// API is a work in progress and is subject to change
use stateforward as sf;
struct E1Interface {}
struct O1Interface {
value: i32
}
let mut example_model = sf::model(vec![
sf::statemachine("sm", vec![
sf::event("e1", E1Interface {}),
sf::operation("o1", |_:&sf::Model, args: Option<Box<dyn Any>>| {
None
}),
sf::attribute("a1", 1),
sf::region("r1", vec![
sf::state("s1", vec![
sf::entry(|_, _: &mut Behavior| {
println!("Hello from entry");
}),
]),
sf::state("s2", vec![]),
sf::transition(vec!["/sm/e1"], "s1", "s2", None, None),
]),
sf::region("r2", vec![
sf::state("s2", vec![])
])
])
]);
example_model.execute();
What is Stateforward?
StateForward is a cutting-edge library designed to streamline complex state management, making it simpler and more efficient.
Why is it needed?
It addresses the challenges of managing complex state changes in modern applications, offering a structured and maintainable approach.
What kind of license?
StateForward is released under the MIT license, offering flexibility and freedom for both personal and commercial use.