Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
hv
hv
is a high level Rust bindings for Hypervisor Framework.
Build virtualization solutions on top of a lightweight hypervisor using Rust:
- Full Hypervisor Framework support.
- Supports Apple Silicon.
- Safe Rust API.
Please also see the repository for latest changes and updates.
Requirements
Hypervisor Framework
At runtime, determine whether the Hypervisor APIs are available on a particular machine with the sysctl
:
In order to use Hypervisor API your app must have com.apple.security.hypervisor
entitlement.
Refer to example.entitlements for example of how entitlement file might look like.
Use the following command to self sign your binary for local development:
Rust
Developed and tested on latest stable Rust (1.53.0+).
Be sure to have Xcode installed and don't forget to xcode-select --install
,
otherwise bindgen
may fail to find Hypervisor headers.
Usage
This crate uses hv-sys
Example
Here is basic "Hello world" example on Apple Silicon:
// Init VM
let vm = new;
// Initialize guest memory
vm.map?;
// Create VCPU
let cpu = vm.create_cpu?;
// Set regs
cpu.set_reg?
cpu.set_reg?
loop