Skip to main content

Module shell

Module shell 

Source
Expand description

Platform-agnostic shell trait.

PlatformShell is the seam where a thin per-platform adapter (FUSE on Linux, FSKit on macOS, ProjFS / CfAPI on Windows) plugs into the content-addressed core. The core implements this trait once, and each platform binding wraps it.

Conceptually the trait is six pure operations: lookup, read, write, enumerate, attrs, invalidate. They mirror what every kernel-side filesystem hook ultimately needs to ask, so they can be implemented for an in-memory test mount, a Git-backed mount, a Heddle-state-backed mount, etc.

Structs§

AttrUpdate
Optional fields a caller may update via PlatformShell::set_attrs. Every field is Option<_>; None means “leave alone” (the kernel passes None for slots the chmod/chown/truncate/utimensat call didn’t touch).
Attrs
Stat-style attributes for a single node.
Entry
A single directory entry, returned from PlatformShell::lookup and PlatformShell::enumerate.
NodeId
Identifier for a filesystem node within a single mount session.
RenameOptions
Optional flags for PlatformShell::rename_entry_with_options. Mirrors the subset of Linux renameat2(2) flags the mount supports; non-applicable flags on non-Linux adapters can be left as their defaults.

Enums§

NodeKind
What a filesystem entry is, structurally.

Traits§

PlatformShell
Platform-agnostic operations every adapter implements against a shared core. Names mirror the eventual FUSE callbacks (and the equivalent FSKit / ProjFS hooks) so the platform layer can be almost trivial.