pub fn resolve_backend(
name: &str,
ctx: &BackendCtx,
) -> Result<Arc<dyn SandboxBackend>>Expand description
Resolve worker.backend to a constructed SandboxBackend, fail-closed.
name is either a registered backend name or "auto". This is the single
function both factories.rs and bin/main.rs route through — no scattered
#[cfg], no _ => nspawn fallback.
"auto"→ amongauto_selectableregistrations, the highest-priorityone whoseis_availableis true; error if none (auto-excluded backends are never picked here — no silent downgrade).- concrete name → that registration if present and available, regardless
of
auto_selectable; otherwise error (unavailable → fail-closed; unknown → error listing the registry).