Skip to main content

Crate hyprstream_vfs

Crate hyprstream_vfs 

Source
Expand description

Plan9-inspired VFS namespace multiplexer.

The VFS is a client-side mount table that routes 9P operations by path prefix. Services are auto-mounted under /srv/{name} from discovery. Commands live at /bin/ (Plan9 convention). Local mounts (/config/, /private/, /bin/, /env/) are reserved for Mount only.

/bin/cat                        → filesystem command (CtlFile)
/env/temperature                → session variable (DynamicDir)
/srv/model/qwen3:main/status    → ModelService (via ZMQ or IPC)
/srv/mcp/summarize/schema       → McpService
/config/temperature             → in-process (Mount)
/net/peer-a/srv/model/...       → federated peer

All types are WASM-compatible. Transport is abstracted via traits.

Re-exports§

pub use devfile::ControlFile;
pub use devfile::DevFileState;
pub use devfile::DevFuture;
pub use devfile::DynamicDir;
pub use devfile::FieldFile;
pub use devfile::NoSetter;
pub use mac_pep::NamespaceAction;
pub use mac_pep::DenyAllNamespace;
pub use mac_pep::DenyAllSubjects;
pub use mac_pep::DenyUnlabeledResolver;
pub use mac_pep::NamespaceAccessDecider;
pub use mac_pep::NamespacePep;
pub use mac_pep::SubjectContextResolver;
pub use injected::StreamMount;
pub use injected::StreamRegistry;
pub use injected::SyntheticMount;
pub use injected::SyntheticNode;

Modules§

devfile
Reusable synthetic-file primitives for hand-built [Mount] implementations.
injected
Native injected mounts for a per-sandbox VFS namespace (FS-D, #365).
mac_pep
MAC PEP for the direct Namespace API (#1272): the contract Namespace invokes per op, plus fail-closed defaults. The audited production impl lives in hyprstream::mac::pep. MAC PEP for the direct Namespace API (#1272, epic #1267 T3).
overlay
Rootfs overlay — the v1 overlay backend (native only).
proxy
VFS proxy for bridging sync callers to async Namespace operations.

Structs§

DirEntry
Directory entry.
Fid
Opaque fid handle from a mount.
FuseFileSystemMount
Up-adapter: exposes a fuse_backend_rs [FileSystem] as an FsMount.
Namespace
Client-side namespace. Maps path prefixes to mount targets.
ReadMountTarget
A routed mount capability restricted to read operations. The underlying writable Mount is never returned to read-only protocol adapters.
SetAttr
Attribute changes for FsMount::setattr.
Stat
File metadata.
Subject
Authorization subject for Casbin policy checks and resource isolation.
ZeroOpenLayer
Wrap a handleless [Layer] so it presents a non-None handle to OverlayFs. See the module docs.

Enums§

BindFlag
How a new mount interacts with existing mounts at the same prefix.
MountError
Mount-level error.
NamespaceError
Namespace error.

Constants§

DMDIR
Plan 9 DMDIR permission bit. OR’d into perm for create to make a directory.
ORCLOSE
Remove on clunk (OR’d with above)
ORDWR
Open for read+write
OREAD
Open for reading
OTRUNC
Truncate on open (OR’d with above)
OWRITE
Open for writing
STANDARD_NAMESPACE_PATHS
Canonical mount paths every hyprstream namespace exposes, regardless of transport (native TUI vs WASM browser).

Traits§

FsMount
A full, writable filesystem mount — the hyprstream overlay interface.
Mount
In-process mount backend. Implements 9P semantics without ZMQ/IPC.

Type Aliases§

BoxedLayer
MountTarget
What a mount point routes to — always an in-process Mount impl.