Skip to main content

VmExecutionSession

Trait VmExecutionSession 

Source
pub trait VmExecutionSession {
    // Required methods
    fn ensure_ready(&mut self, vfs: &Vfs, vfs_cwd: &str) -> Result<(), VmError>;
    fn run_rust_tool(
        &mut self,
        vfs: &mut Vfs,
        vfs_cwd: &str,
        program: &str,
        args: &[String],
    ) -> Result<ExitStatus, VmError>;
    fn shutdown(&mut self, vfs: &mut Vfs, vfs_cwd: &str) -> Result<(), VmError>;
}
Expand description

Abstraction for a devshell execution session (host temp dir, γ VM, or β sidecar).

Required Methods§

Source

fn ensure_ready(&mut self, vfs: &Vfs, vfs_cwd: &str) -> Result<(), VmError>

Prepare the session (e.g. start VM, initial push). No-op for host temp export.

Source

fn run_rust_tool( &mut self, vfs: &mut Vfs, vfs_cwd: &str, program: &str, args: &[String], ) -> Result<ExitStatus, VmError>

Run rustup or cargo with cwd matching vfs_cwd; update vfs as defined by the backend.

Source

fn shutdown(&mut self, vfs: &mut Vfs, vfs_cwd: &str) -> Result<(), VmError>

Tear down (e.g. final pull, stop VM).

Implementors§