fskit-rs

Crates.iofskit-rs
lib.rsfskit-rs
version0.1.0
created_at2025-11-09 23:24:54.217817+00
updated_at2025-11-09 23:24:54.217817+00
descriptionRust crate for FSKitBridge protocol & socket layer (TCP + Protobuf)
homepage
repositoryhttps://github.com/debox-network/fskit-rs
max_upload_size
id1924566
size138,765
Pavel Denisov (denisovpi)

documentation

README

fskit-rs

A Rust companion to FSKitBridge that provides the protocol & socket layer and a trait for implementing your macOS FSKit backend in Rust.

Requires macOS 15.4+

Why fskit-rs?

FSKit runs file systems in user space on macOS, but its public API is Swift. fskit-rs lets you keep the engine in Rust while FSKitBridge (Swift/appex) handles FSKit/XPC. The two talk over TCP localhost using length-delimited Protobuf messages defined in protocol.proto.

Keep your core in Rust; let FSKitBridge speak Swift to macOS.

FSKitBridge

This crate pairs with the Swift-side FSKitBridge project (host app + FSKitExt appex). For the Swift/FSKit integration details, see:

What’s in this crate?

  • Trait-based backend API: Implement the Filesystem trait to handle file system operations.
  • Types & schema (protocol.proto): Common FS/OS types re-exported from code generated by the protocol schema. The schema is the wire contract between the Swift appex and this Rust backend — defining all RPC messages/enums.
  • Handle errors: Unified Error (includes POSIX via libc::*) and Result<T>.
  • Session runner: session::mount(fs, opts) mounts and serves requests until dropped.
  • Installer helper: install(path, force) utility for host app installation (optional).

This crate is the transport + protocol + trait layer. You bring the actual file system logic.

Quick start

A minimal example is provided in examples/basic_fs.rs. It starts a stub backend with default MountOptions, mounts the file system (e.g., at /tmp/fskitbridge), and serves requests until you press Ctrl+C. Use it as a skeleton and replace the ENOSYS stubs with your real logic.

License

This project is dual-licensed under Apache-2.0 and MIT:

Contributions: Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work shall be dual-licensed as above, without additional terms or conditions.

Commit count: 0

cargo fmt