axvisor_api 0.5.12

Basic API for components of the Hypervisor on ArceOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Console APIs for virtual console devices.

/// Console I/O interface exposed by the hypervisor host.
#[crate::api_def]
pub trait ConsoleIf {
    /// Writes raw bytes to the host console.
    fn write_bytes(bytes: &[u8]);

    /// Reads bytes from the host console into `bytes`.
    ///
    /// Returns the number of bytes read.
    fn read_bytes(bytes: &mut [u8]) -> usize;
}