Skip to main content

VmExecutionSession

Trait VmExecutionSession 

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

    // Provided methods
    fn ensure_ready(
        &mut self,
        _vfs: &Vfs,
        _vfs_cwd: &str,
    ) -> Result<(), 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 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.

§Errors

Returns backend execution or sync failures from the selected session implementation.

Provided 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.

§Errors

Returns backend-specific failures while preparing VM/sandbox state.

Source

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

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

§Errors

Returns backend-specific failures during shutdown/sync.

Implementors§