diff options
Diffstat (limited to 'crates/hule-vmm/src/machine.rs')
| -rw-r--r-- | crates/hule-vmm/src/machine.rs | 10 | +6 −4 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/hule-vmm/src/machine.rs b/crates/hule-vmm/src/machine.rs index f1df0e5..914bd4d 100644 --- a/crates/hule-vmm/src/machine.rs +++ b/crates/hule-vmm/src/machine.rs @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2026 Nikolay Govorov +// SPDX-FileCopyrightText: 2026 Nikolay Govorov // SPDX-License-Identifier: Apache-2.0 use std::fmt; @@ -38,10 +38,10 @@ pub trait Console: AsyncRead + AsyncWrite + Send + Unpin {} impl<T: AsyncRead + AsyncWrite + Send + Unpin> Console for T {} /// Deployment-time config of one instance -- distinct from -/// [`hule_hmi::MachineImage`], which only declares a cpu/ram *range* and +/// [`hule_image::MachineImage`], which only declares a cpu/ram *range* and /// knows nothing about e.g. host ports. Always concrete: callers resolve /// image defaults before constructing this. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone)] pub struct Settings { pub cpu: u32, pub ram: u64, // megabytes @@ -90,7 +90,9 @@ pub trait Machine: Send + Sync { async fn update(&mut self, settings: Settings) -> R<()>; async fn rename(&mut self, name: Option<&str>) -> R<()>; - async fn exec(&self, cmd: &[String]) -> R<Output>; async fn wait(&mut self) -> R<ExitStatus>; + async fn exec(&self, cmd: &[String]) -> R<Output>; + async fn attach(&self) -> R<Box<dyn Console>>; + async fn resize(&self, cols: u16, rows: u16) -> R<()>; } |
