FSK
Build cross-platform virtual filesystems in Rust.
FSK is a Rust toolkit for building real filesystems. You implement one trait, then mount it as a native volume: FSKit on macOS, FUSE on Linux, or ProjFS on Windows.
The crate owns the platform plumbing — mounting, IPC, authorization, directory encoding and lifecycle. Your backend owns the data. A read-only volume only needs five methods; writes are opt-in.
Start here
- Getting started — install the crate and mount a filesystem with five methods
- Core concepts — inodes, names, metadata, errors and concurrency
- Implementing a filesystem — every trait method, required and defaulted
- Directories and lookup — cookies, verifiers and streamed enumeration
- Reading and writing — data paths, sparse files and permissions
How it fits together
The adapter owns decoding, buffer bounds and error translation. Your backend never sees a native pointer unless it asked for raw events, and never returns a native error code.
Platform support
On any other target authorization_status() returns io::ErrorKind::Unsupported and no
MountSession exists.
What FSK leaves to you
FSK does not impose a filesystem design. In particular, it does not provide:
- Storage — bytes live wherever you put them; the crate never persists anything.
- An inode index — you allocate inode numbers and decide how to find them again.
- A cache — no page cache, no attribute cache, no eviction policy of its own.
- Locking — adapters call methods concurrently; your state needs your own locks.
- Transactions — FSK provides no transaction boundary; a sequence of mutations is not atomic.
- A consistency policy — when to bump
generation, invalidate a cookie or returnSTALEis your call.
This is deliberate. The same trait has to serve a Git server, a cloud drive, and a synthetic debug view, and those want different answers.
Guide
- Getting started
- Core concepts
- Implementing a filesystem
- Directories and lookup
- Reading and writing
- Mounting and lifecycle
- Network filesystems
- Platform setup
- Raw events
- Testing a backend
- Examples
- Troubleshooting
Reference
- Architecture — how the adapters, the C ABI and the Swift extension fit together
Crates and examples
fsk requires Rust 1.85 or later and is MIT licensed. Mounting also requires the platform
component listed above; see Platform setup.
