Expand description
Write Machina virtio devices in Rust.
This crate aims to simplify the writing of virtio devices as out of process FIDL services by automating boiler plate and providing common wrappers for Machina/Fuchsia specifics.
The primary helper is the Device
object that wraps most of the common other helpers, and
this must be constructed via the DeviceBuilder
, although any of the individual helpers can
be used independently without Device
if desired.
Structs§
- Device
- State for managing a virtio device and its queues using futures.
- Device
Builder - Helper to process device messages and build a
Device
- Guest
Bell Trap - Wrapper for receiving bell traps from the guest.
- Guest
Mem - Provide access to guest memory.
- Notify
Event - Wraps a
zx::Event
and implements [DriverNotify
] - Queue
Config - Raw queue configuration from a
VirtioDeviceRequest::ConfigureQueue
- Wrapped
Desc Chain Stream - Wrapper around a [
DescChainStream
]
Enums§
Traits§
- Queue
Check - Describes the queues that are expected and valid for a device
Functions§
- builder_
from_ start_ info - Construct a
DeviceBuilder
from the providedStartInfo
- config_
builder_ from_ stream - Process a
VirtioDeviceRequestStream
to configure all the queues. - from_
start_ info - Construct a
DeviceBuilder
andGuestMem
from the providedStartInfo
- guest_
mem_ from_ vmo - Construct a new
GuestMem
containing the givenzx::Vmo
- translate_
queue - Helper for constructing a [
QueueMemory
]