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.
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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VfsMountMode
impl Debug for VfsMountMode
Auto Trait Implementations§
impl Freeze for VfsMountMode
impl RefUnwindSafe for VfsMountMode
impl Send for VfsMountMode
impl Sync for VfsMountMode
impl Unpin for VfsMountMode
impl UnwindSafe for VfsMountMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more