Skip to content

macos_vz

Structs


Struct

macOS runtime backend.

Operates in one of three modes:

  • Compatibility mode (default): sandbox-exec + HTTP_PROXY injection. Proxy-only; requires --allow-non-structural. Equivalent to the current macOS compatibility baseline.

  • Sandbox-exec structural mode (FIRMA_RUN_VZ_STRUCTURAL_NETWORK=1): sandbox-exec with deny network-outbound policy that restricts the wrapped process to loopback connections only. The host-side proxy bridge and DNS stub run on loopback; other loopback services remain a residual caveat until the guest-backed path can narrow the boundary further. This mode reports structural=true with network_confinement=macos_sandbox_network_deny. This is an intermediate structural step before the guest-backed path.

  • VZ guest structural mode (FIRMA_RUN_VZ_GUEST=1): launch a configured host runner with an explicit JSON contract. The runner owns the Virtualization.framework lifecycle and must boot a guest whose only usable egress path is the sidecar bridge provided in the contract. This mode reports structural=true with network_confinement=macos_vz_guest.

Unit Struct

Methods:

  • fn new() -> Self

Trait Implementations:

  • SandboxBackend
    • fn kind(self: &Self) -> BackendKind
    • fn prepare(self: &Self, request: &PrepareRequest) -> Result<SandboxHandle, RunError>
    • fn enforce_network(self: &Self, _handle: &SandboxHandle, policy: &NetworkPolicy) -> Result<EnforcementProof, RunError>
    • fn verify_fail_closed(self: &Self, _handle: &SandboxHandle, proof: &EnforcementProof) -> Result<(), RunError>
    • fn start_agent(self: &Self, handle: &SandboxHandle, launch: &LaunchSpec) -> Result<Child, RunError>
    • fn teardown(self: &Self, handle: SandboxHandle) -> Result<(), RunError>
  • Default
    • fn default() -> VzBackend
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result