Crates.io | barley-interface |
lib.rs | barley-interface |
version | 0.3.0 |
source | src |
created_at | 2023-05-17 14:56:35.60975 |
updated_at | 2023-06-05 10:54:16.702145 |
description | A runtime interface for Barley |
homepage | https://github.com/panthios/barley |
repository | https://github.com/panthios/barley |
max_upload_size | |
id | 867021 |
size | 15,850 |
barley-interface
This crate provides a basic command-line interface for the barley workflow engine. It provides runtime progress and error reporting.
This crate does not provide any interactive features, as that would defeat the purpose of Barley entirely. It is simply a wrapper around the base Context
that provides more information at runtime.
use barley_interface::Interface;
use barley_runtime::*;
use barley_std::thread::Sleep;
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<()> {
let interface = Interface::new();
let sleep = Sleep::new(Duration::from_secs(1));
interface.add_action(sleep).await;
interface.run().await
}