1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! bare-script: The type-safe scripting authority for Rust.
//!
//! A framework for building robust shell commands and automation
//! with "Parse, don't validate" philosophy.
//!
//! # Overview
//!
//! This library provides two APIs:
//! - **Sync API** (`sync::CommandBuilder`): Uses `std::process::Command`
//! - **Async API** (`proc::CommandBuilder`): Uses `tokio::process::Command`
//!
//! # Quick Start - Sync
//!
//! ```rust
//! use bare_script::sync::CommandBuilder;
//!
//! #[cfg(not(windows))]
//! {
//! let output = CommandBuilder::new("echo")
//! .arg("Hello, world!")
//! .capture_output()
//! .execute();
//!
//! assert!(output.is_ok());
//! assert!(output.unwrap().success());
//! }
//! ```
//!
//! # Quick Start - Async
//!
//! ```rust
//! use bare_script::proc::CommandBuilder;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), bare_script::ScriptError> {
//! #[cfg(not(windows))]
//! {
//! let output = CommandBuilder::new("echo")
//! .arg("Hello, world!")
//! .capture_output()
//! .execute()
//! .await;
//!
//! assert!(output.is_ok());
//! assert!(output.unwrap().success());
//! }
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use Output;
pub use procCommandBuilder as AsyncCommandBuilder;
pub type AsyncCommandBuilder = CommandBuilder;
pub use CommandBuilder;
pub use Pipeline;
pub use procPipeline as AsyncPipeline;