Skip to main content

Module depth

Module depth 

Source
Expand description

Call-depth cap for ExecutionMode::NoGcTransaction.

Every interpreted application consumes real Rust stack, so a hostile or merely runaway transaction could overflow the host thread’s stack and abort the process. A runtime built in ExecutionMode::NoGcTransaction routes its calls through call_cljrs_fn, which refuses to nest deeper than the limit installed by DepthGuard.

This used to be a call_cljrs_fn function pointer that cljrs-tx stored in GlobalEnv. It is the one call-path override that had a reason to exist, so it survives the removal of the seam — as an execution mode owned by the runtime rather than as an arbitrary hook.

Structs§

DepthGuard
Installs the call-depth budget for one invocation’s dynamic extent.

Constants§

DEPTH_EXCEEDED_MSG
Marker text for a depth-cap rejection. Surfaced as EvalError::Runtime because the interpreter’s call path has a fixed error type; cljrs-tx matches on it to report a depth overrun.

Functions§

call_cljrs_fn
Tree-walking function application with the transaction depth cap applied.