Expand description
Exec runtime: render the parsed Exec mini-language into shell text and run
it through /bin/sh.
The pipeline AST itself is produced by crate::parse::exec; this module
is concerned with turning typed request values into shell-safe words.
Semantics:
- A
ValueRefis resolved against anExecContext(query/path/header/ var maps and aBodyValue). - A
Texttoken is always emitted as one argv element. Missing interpolations render as the empty string. - A
[..]Grouptoken is used for shell words that contain interpolation. It is emitted only if every interpolation resolves; otherwise the whole group is omitted. - Request values interpolated into shell text are single-quoted. Literal shell syntax written by the spec author remains literal shell syntax.
- A binary body or binary form field used outside stdin is written to a temp file and the path is interpolated as a quoted shell word.
- Pipeline stages are wired stdin → stdout. A bare
Sourcestage ($ | cmd) feeds a value as stdin to the next command. Multiple statements (multi-line Exec) are joined into a single shell script separated by newlines.
Structs§
- Exec
Completion - Exec
Context - Exec
Output - Streaming
Exec - A handle to a streaming exec: the receiver yields stdout chunks as they are produced; the join handle resolves with the final exit status (and any\n/// captured stderr) once the process completes.
Enums§
Functions§
- build_
argv - preview_
pipeline - Render a human-readable, non-executing preview of
statementsagainstctx. Used by--dry-runto log the commands that would have run. - run_
pipeline - run_
pipeline_ streaming