Skip to content

Rust crate for FSKitBridge protocol & socket layer (TCP + Protobuf)

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

debox-network/fskit-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rust crate for FSKitBridge protocol & socket layer (TCP + Protobuf)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages