4 releases (breaking)
0.4.0 | Jun 13, 2023 |
---|---|
0.3.0 | Jun 10, 2023 |
0.2.0 | Jun 7, 2023 |
0.1.0 | Jun 5, 2023 |
#2 in #barley
35KB
755 lines
barley-std
This crate contains the standard library for the barley workflow engine. It provides a set of common actions that can be used in any script.
Usage
use barley_runtime::prelude::*;
use barley_std::thread::Sleep;
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), ActionError> {
tracing_subscriber::fmt::init();
let sleep_1 = Sleep::new(Duration::from_secs(1));
let sleep_2 = Sleep::new(Duration::from_secs(2));
RuntimeBuilder::new()
.add_action(sleep_1.into()).await
.add_action(sleep_2.into()).await
.build()
.run()
.await
}
Dependencies
~3–12MB
~123K SLoC