Skip to main content

sim_lib_exec/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Capability-gated bounded host-process execution for the SIM runtime.
4//!
5//! This crate supplies a general host `exec` operation for libraries that need
6//! to run an external process under explicit authority. The operation accepts a
7//! structured argv vector, never inserts a shell, captures stdout and stderr,
8//! enforces a mandatory timeout, and truncates captured output at a caller-set
9//! byte cap. It is a host operation, not SIM evaluation.
10
11mod exec;
12
13pub use exec::{ExecOptions, ProcResult, exec, exec_capability, proc_result_symbol};
14
15/// Cookbook recipes for this lib, embedded at build time.
16pub static RECIPES: sim_cookbook::EmbeddedDir =
17    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
18
19#[cfg(test)]
20mod tests;