Skip to main content

detect_backend

Function detect_backend 

Source
pub async fn detect_backend() -> Result<Arc<dyn BuildBackend>>
Expand description

Auto-detect the best available build backend for the current platform.

Selection order:

  1. If the ZLAYER_BACKEND environment variable is set to "buildah" or "sandbox", that backend is forced.
  2. On macOS, buildah is tried first; if unavailable, the sandbox backend is returned as a fallback.
  3. On Linux, only the buildah backend is available.

ยงErrors

Returns an error if no usable backend can be found.