Skip to main content

earl_protocol_bash/
lib.rs

1pub mod builder;
2pub mod executor;
3pub mod sandbox;
4pub mod schema;
5
6pub use executor::BashExecutor;
7pub use executor::BashStreamExecutor;
8pub use schema::{BashOperationTemplate, BashSandboxTemplate, BashScriptTemplate};
9
10/// Resolved sandbox settings for bash execution.
11#[derive(Debug, Clone)]
12pub struct ResolvedBashSandbox {
13    pub network: bool,
14    pub writable_paths: Vec<String>,
15    pub max_time_ms: Option<u64>,
16    pub max_output_bytes: Option<usize>,
17    pub max_memory_bytes: Option<usize>,
18    pub max_cpu_time_ms: Option<u64>,
19}
20
21/// Prepared bash script data, ready for execution.
22#[derive(Debug, Clone)]
23pub struct PreparedBashScript {
24    pub script: String,
25    pub env: Vec<(String, String)>,
26    pub cwd: Option<String>,
27    pub stdin: Option<String>,
28    pub sandbox: ResolvedBashSandbox,
29}