pub struct GammaSession { /* private fields */ }Expand description
Lima-backed session: sync VFS ↔ host workspace, run tools inside the VM.
Implementations§
Source§impl GammaSession
impl GammaSession
Sourcepub fn new(config: &VmConfig) -> Result<Self, VmError>
pub fn new(config: &VmConfig) -> Result<Self, VmError>
Build a γ session from VM config (does not start the VM yet).
§Errors
Returns VmError::Lima if limactl cannot be resolved.
Sourcepub const fn syncs_vfs_with_host_workspace(&self) -> bool
pub const fn syncs_vfs_with_host_workspace(&self) -> bool
Whether this session push/pulls the in-memory VFS around rust tools (Mode S). false = guest-primary (WorkspaceMode::Guest).
Sourcepub fn guest_mount(&self) -> &str
pub fn guest_mount(&self) -> &str
Guest mount point (e.g. /workspace).
Sourcepub fn workspace_parent(&self) -> &Path
pub fn workspace_parent(&self) -> &Path
Host workspace root (for docs / debugging).
Sourcepub fn limactl_path(&self) -> &Path
pub fn limactl_path(&self) -> &Path
Path to limactl binary (for exec delegation).
Sourcepub fn lima_instance_name(&self) -> &str
pub fn lima_instance_name(&self) -> &str
Lima instance name (limactl shell <this> …).
Sourcepub fn guest_todo_release_path_for_shell(&self) -> Option<String>
pub fn guest_todo_release_path_for_shell(&self) -> Option<String>
If host cwd has target/release/todo under Self::workspace_parent, return guest path
to that release dir for PATH (same logic as guest_todo_release_dir_for_cwd in session helpers).
Sourcepub fn lima_interactive_shell_workdir_and_inner(&self) -> (String, String)
pub fn lima_interactive_shell_workdir_and_inner(&self) -> (String, String)
Guest --workdir and bash -lc body for super::super::SessionHolder::exec_lima_interactive_shell:
cd to the host current_dir project under the Lima workspace mount, optional $HOME/host_dir symlink,
and ~/.todo.json → ~/host_dir/.todo.json.
Trait Implementations§
Source§impl Debug for GammaSession
impl Debug for GammaSession
Source§impl GuestFsOps for GammaSession
Available on Unix only.GuestFsOps on the live γ session (used by REPL dispatch in guest-primary mode).
impl GuestFsOps for GammaSession
GuestFsOps on the live γ session (used by REPL dispatch in guest-primary mode).