Skip to main content

Module vfs

Module vfs 

Source
Expand description

Virtual Filesystem (VFS) for kaish.

The VFS provides a unified interface over multiple filesystem backends:

  • MemoryFs: In-memory ephemeral storage (for /v, tests)
  • LocalFs: Real filesystem access (for mounted worktrees)
  • VfsRouter: Routes paths to mounted backends

§Design

Kaish kernels own / in their VFS. Backends are mounted at paths:

/                      # kernel root
├── /v/                # MemoryFs (blobs, jobs)
├── /mnt/project/      # LocalFs (worktree, rw)
└── /mnt/reference/    # LocalFs (repo, ro)

The router finds the longest matching mount point and delegates operations.

Structs§

BuiltinFs
A read-only filesystem that exposes registered builtins as entries.
ByteBudget
A shared cap on memory-resident bytes.
DirEntry
A directory entry — the unified file metadata type.
JobFs
Virtual filesystem providing job observability.
LocalFs
Local filesystem backend.
MemoryFs
In-memory filesystem.
MountInfo
Information about a mount point.
VfsRouter
Routes filesystem operations to mounted backends.

Enums§

DirEntryKind
Kind of directory entry.

Traits§

Filesystem
Abstract filesystem interface.