Interactive Actions
This is a Rust library that runs actions and interactions that are defined declaratively.
Dependency
[]
= "1"
For most recent version see crates.io
Usage
Run the example:
$ cargo run --example interaction
Finished dev target in 0.30s
Running `target/debug/examples/interaction`
start
✔ are you ready to start? · Yes
city
✔ input a city · goo
transport
✔ pick a transport · bus
+ cd projects/interactive-actions
+ echo go for goo on a bus
go for goo on a bus
Create a Vec<Action>
, here described in YAML, but you can either build it in Rust or any Deserialize
format:
- name: city
interaction:
kind: input
prompt: input a city
out: city
And run it:
use ;
let actions: = from_str.unwrap;
let mut runner = default;
let res = runner.run;
Copyright
Copyright (c) 2022 @jondot. See LICENSE for further details.