Skip to main content

Module vm

Module vm 

Source
Expand description

Optional session-scoped VM execution (γ CLI / β sidecar): host SessionHolder::Host, Unix γ SessionHolder::Gamma.

Re-exports§

pub use sync::pull_workspace_to_vfs;
pub use sync::push_full;
pub use sync::push_incremental;
pub use sync::VmSyncError;

Modules§

sync
Push/pull between VFS and a persistent host workspace directory (session VM staging).

Structs§

GammaSession
Lima-backed session: sync VFS ↔ host workspace, run tools inside the VM.
HostSandboxSession
Runs rustup/cargo via temp directory export + sync (no persistent VM).
VmConfig
Parsed VM-related environment.

Enums§

SessionHolder
Active VM / sandbox backend for one REPL or script run.
VmError
Errors from VM session operations.

Constants§

ENV_DEVSHELL_VM
DEVSHELL_VMRelease / binary default: unset means on (use VM backend per ENV_DEVSHELL_VM_BACKEND). Set to off / 0 / false / no (case-insensitive) to use only the host temp sandbox. on / 1 / true / yes also enable VM mode.
ENV_DEVSHELL_VM_BACKEND
Backend selector: host, auto, lima, beta, …
ENV_DEVSHELL_VM_EAGER
When 1/true/yes, start the VM session eagerly (future γ); default is lazy start on first rust tool.
ENV_DEVSHELL_VM_GUEST_WORKSPACE
Guest mount point for that directory (default /workspace).
ENV_DEVSHELL_VM_LIMACTL
Override path to limactl (default: PATH).
ENV_DEVSHELL_VM_LIMA_HINTS
Set to 0/false/no/off to silence Lima configuration hints.
ENV_DEVSHELL_VM_LIMA_INSTANCE
Lima instance name for γ (limactl shell <name>).
ENV_DEVSHELL_VM_SOCKET
Unix socket path for β client ↔ devshell-vm --serve-socket (see IPC draft).
ENV_DEVSHELL_VM_STOP_ON_EXIT
When set truthy, run limactl stop on session shutdown.
ENV_DEVSHELL_VM_WORKSPACE_PARENT
Host directory we push/pull (must be mounted at GammaSession::guest_mount in the Lima VM).

Traits§

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

Functions§

try_session_rc
Build SessionHolder from the environment. On failure (e.g. default γ Lima but limactl missing), writes to stderr and returns Err(()). Use DEVSHELL_VM=off or DEVSHELL_VM_BACKEND=host to force the host temp sandbox.