docs.rs failed to build vmnet-0.5.0
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.
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.
Visit the last successful build:
vmnet-0.4.2
vmnet
Apple's vmnet.framework bindings for Rust.
Installation
Add this to your Cargo.toml:
[]
= "0"
Usage
Ensure that your software either has an com.apple.vm.networking entitlement or is running with elevated privileges.
Start a NAT interface and receive some packets destined to it:
let shared_mode = Shared ;
let mut iface = new.unwrap;
let = sync_channel;
iface.set_event_callback.unwrap;
let pkts = rx.recv.unwrap;
println!;
for _ in 0..pkts
drop;
iface.finalize.unwrap;
Quirks
- due to Apple's usage of blocks as a way to retrieve API call results, some methods like
set_event_callback()require the provided closure to have a'staticlifetime- this manifests itself in not being able to use
Interfacefrom such closure - however, this can be easily worked around by using interior mutability pattern or simply by using the callback as a signal carrier
- this manifests itself in not being able to use
- due to
API_AVAILABLEmacro not being supported it is assumed that this package is running on macOS 15.0 or newer