pub enum VfsMountMode {
Passthrough,
Sandboxed {
root: Option<PathBuf>,
},
NoLocal,
}Expand description
VFS mount mode determines how the local filesystem is exposed.
Different modes trade off convenience vs. security:
Passthroughgives native path access (best for human REPL use)Sandboxedrestricts access to a subtree (safer for agents)NoLocalprovides complete isolation (tests, pure memory mode)
Variants§
Passthrough
LocalFs at “/” — native paths work directly.
Full filesystem access. Use for human-operated REPL sessions where
native paths like /home/user/project should just work.
Mounts:
/→ LocalFs(“/”)/v→ MemoryFs (blob storage)
Sandboxed
Transparent sandbox — paths look native but access is restricted.
The local filesystem is mounted at its real path (e.g., /home/user),
so /home/user/src/project just works. But paths outside the sandbox
root are not accessible.
Note: This only restricts VFS (builtin) operations. External commands
bypass the sandbox entirely — see KernelConfig::allow_external_commands.
Mounts:
/→ MemoryFs (catches paths outside sandbox){root}→ LocalFs(root) (e.g.,/home/user→ LocalFs)/tmp→ LocalFs(“/tmp”)/v→ MemoryFs (blob storage)
Fields
NoLocal
No local filesystem. Memory only.
Complete isolation — no access to the host filesystem. Useful for tests or pure sandboxed execution.
Mounts:
/→ MemoryFs/tmp→ MemoryFs/v→ MemoryFs
Trait Implementations§
Source§impl Clone for VfsMountMode
impl Clone for VfsMountMode
Source§fn clone(&self) -> VfsMountMode
fn clone(&self) -> VfsMountMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more