Skip to main content

install_stdlib_with

Function install_stdlib_with 

Source
pub fn install_stdlib_with(
    interp: &mut Interpreter<ScriptCtx>,
    ctx: &mut ScriptCtx,
    profile: &Profile,
)
Expand description

Install the stdlib under a capability Profile.

Families outside the profile are never installed, so their names are simply unbound and calling one is an unbound-symbol error from the evaluator. There is no runtime policy check to consult or to get wrong — the containment IS the absence.

install_stdlib is this with Profile::ambient, which grants everything, so no existing embedder changes behaviour.

Reach for Profile::sealed whenever the source being evaluated is not source you wrote: a controller reconciling a CR, a renderer inside a compliance boundary. The ambient set includes sh-exec (a literal sh -c), rm-rf, env-set, kube-bearer-token and sops-extract — correct for an operator running a deploy script, wrong for anything else.