Overview
This issue proposes the development of Rust bindings for vmnet-broker. This component is responsible for managing privileged network interface creation (via vmnet.framework) for virtual machines, allowing the primary virtualization process to operate without root privileges.
Rationale
Current implementations typically rely on Swift or Go. Introducing Rust bindings addresses specific memory safety and lifecycle concerns inherent in privileged brokerage services.
Potential users
Several projects in the macOS virtualization space could leverage a Rust-based broker:
- libkrun: can use this if it implements native vmnet network like vfkit
- OrbStack: Could utilize a standardized Rust broker for its networking backend to enhance memory safety in its privileged components.
- Rust-based VZ Implementations: Developers building CLI-based virtualization tools in Rust (using crates like
virt-fwk or objc2-virtualization) currently lack an idiomatic, safe way to interface with vmnet-broker.
- Security-Hardened Virtualization: Developers building "minimal" or "hardened" VM runners for macOS can use a Rust broker to minimize the Trusted Computing Base (TCB) of the privileged networking component.
Issues:
- Initial development requires significant
unsafe FFI boilerplate to map vmnet C headers.
- Maintenance overhead to track changes in Apple's networking frameworks which may not be documented as thoroughly as the core Virtualization API.
Supporting Documentation
Overview
This issue proposes the development of Rust bindings for
vmnet-broker. This component is responsible for managing privileged network interface creation (viavmnet.framework) for virtual machines, allowing the primary virtualization process to operate without root privileges.Rationale
Current implementations typically rely on Swift or Go. Introducing Rust bindings addresses specific memory safety and lifecycle concerns inherent in privileged brokerage services.
Potential users
Several projects in the macOS virtualization space could leverage a Rust-based broker:
virt-fwkorobjc2-virtualization) currently lack an idiomatic, safe way to interface withvmnet-broker.Issues:
unsafeFFI boilerplate to mapvmnetC headers.Supporting Documentation