Output of one Engine run: the final working directory, the filesystem
handle the run executed against, and the top-level script variable
bindings captured at completion.
Execution state for one script run. Public so hosts can register
functions and introspect listings; all fields stay crate-private so the
scope, recursion-budget, and task invariants cannot be broken from outside.
Pipeline exit request carrying the numeric code. Produced by EXIT,
re-raised by REMOTE when the guest exits, and mapped to the process
exit status by the CLI.
Introspectable metadata for one function. Single source for
DESCRIBE(name) output and the static function reference. rpn names
whether the function also runs on the compiled math path (true for
pure functions and opted-in stateful ones); everything runs on the AST
path.
One declared parameter of a registered function. param_type is None
for unconstrained Value parameters (the macro accepts any value).
allowed names the closed value set for constrained STRING
parameters, declared once via #[values(...)]: the generated
extractor enforces membership and the reference renders the set,
so the list cannot rot apart from the check. docs carries the
parameter’s description (parsed from the # Arguments doc section
for macro functions, written inline for hand-built entries) and
renders into every reference surface. options declares the known
keys of a MAP options parameter: same single-source rule as
allowed, with per-key types, required flags, defaults, and docs.
optional marks a trailing MAP parameter callers may omit: the
runtime fills an empty MAP, and signatures render = {}. Only
trailing MAP params may be optional (run-start validation
rejects anything else), so omission always means “no options”.
The macro never emits optional params: only hand-built entries
use them, and only for options MAPs.
One host library: functions and types registered under a single module
name. Engine::register_module stages these; runs expose them as
MODULE::NAME calls with MODULE provenance on every entry.
Value-model re-exports: the word, its payload, type descriptors, and the
export hook live in crate::value, the single representation for
every type.
Vtable for one type: lifecycle plus operations. All hooks are plain
function pointers (never closures) so descriptors stay Copy and the
global table hands them out by value. Every hook documents the payload
domain it expects; calling one with a foreign payload is unsound, and
every call site is a single choke point reviewed with the layout.
Origin of a callable in the unified function registry. Script is an
interpreted FUNC body; HostCtx and HostPure are compiled Rust
functions (the #[oxdock_func] host export macro). Builtins and
runtime-registered hosts share the host kinds; only DESCRIBE output
shows the label, and both host kinds keep rendering as host.
One namespaced guard predicate. Every guard in the language is a
namespace plus an optional subject plus an optional value; the
single disjointness rule compares the whole triple, so no domain
ever needs its own table.
One host-registered function, grouped into a HostModule and passed
to Engine::register_module. Build the entry with the #[oxdock_func]-
generated registration marker, or by hand. Pure entries run
on both the AST and the compiled RPN math paths; Stateful entries run
on the AST path with full step context. Both entries carry a stateful
body plus a pure string projection: every context with step IO runs
the body, while {{ }} placeholder expansion (which has no step
context) runs the projection.
Export hook for a DSL function, implemented by #[oxdock_func] on a
registration marker. The engine calls registration() and never names
a generated symbol.
Value-model re-exports: the word, its payload, type descriptors, and the
export hook live in crate::value, the single representation for
every type.
Export hook for a DSL payload type, implemented by #[oxdock_type] on
the payload struct itself. The canonical descriptor singleton backs
every word of the type; user code never names a generated symbol.
Build the run’s endpoint registry from CLI flags and bind every mapped
socket now: callers run this before parsing so bind conflicts fail
fast, never parse-then-fail-on-bind.
Outermost EXIT code in the chain, if any. Relays preserve the code
unchanged, so first-found and last-found agree; outermost wins because
it is the most recent relay decision.
Parse a script using the production lower_command dispatcher.
The typed ParseError converts into anyhow::Error at this boundary
with no intermediate .context() wrapping, so the message survives.
Builtin function names seed the reserved set, so FUNC shadowing a
native fails here; hosts unknown at parse time fall back to the runtime
define_func guard.
Parse with a module provenance table so calls resolve statically:
qualified MODULE::NAME checks membership, bare NAME resolves through
SCRIPT definitions and IMPORTed modules. Reserved covers builtins
plus every table module, so FUNC shadowing any of them fails here;
hosts unknown at parse time fall back to the runtime define_func
guard.
Process exit status for a failed CLI run: relays an EXIT code (host
or guest-relayed) clamped to the portable 0..=255 range, 1 for every
other failure.
Same as run_steps_with_manager, plus host modules and types. Each
module’s functions become callable as MODULE::NAME with full step
context; each type descriptor becomes visible to TYPES() and valid for
LET $x: NAME declarations carrying same-named opaque payloads.
Authors should derive entries with #[oxdock_func] / #[oxdock_type]
(see oxdock-func-macro) and group them into HostModule instead of
hand-writing metadata and glue.
Same as run_steps_with_manager_with_modules, plus the entry script
file (#115): top-level relative IMPORT paths resolve against its
parent directory. None resolves imports against the workspace root.
Human-readable CLI usage, printed for --help/-h. The full
text, version line included, is rendered once at compile time by
the UsageAssets script above. Feature selection stays in Rust
#[cfg]: the DSL has no feature namespace, so each variant lives
in its own asset file.