pub async fn detect_backend() -> Result<Arc<dyn BuildBackend>>Expand description
Auto-detect the best available build backend for the current platform.
Selection order:
- If the
ZLAYER_BACKENDenvironment variable is set to"buildah"or"sandbox", that backend is forced. - On macOS, buildah is tried first; if unavailable, the sandbox backend is returned as a fallback.
- On Linux, only the buildah backend is available.
ยงErrors
Returns an error if no usable backend can be found.