kin-vfs is the transparent virtual filesystem bridge for the Kin ecosystem. It is the "Trojan horse" that enables legacy, file-first development tools (compilers, linters, legacy text editors, build systems) to operate seamlessly on Kin's graph-first semantic repository.
Instead of forcing you to rewrite your toolchain to interact with a graph database API, kin-vfs projects the semantic graph database onto the filesystem.
- Dynamic Interception: By utilizing standard dynamic linking hooks (
LD_PRELOADon Linux orDYLD_INSERT_LIBRARIES/DYLD_FORCE_FLAT_NAMESPACEon macOS),kin-vfsintercepts standard library filesystem calls (open,read,write,stat,readdir). - Graph-First Serving: When a tool requests a file under a Kin-managed workspace,
kin-vfsredirects the request to fetch the entity source and layout directly from the localkin-daemongraph store, verifying content hashes on the fly. - Git/Local Fallback: File reads that fall outside Kin-managed semantics or references that do not exist in the graph fall back transparently to the underlying physical filesystem.
crates/kin-vfs: Rust crate implementing the VFS lookup, filesystem virtualization logic, cache management, and communication client tokin-daemon.shell/: Shell hook scripts to set up the environment variables (DYLD_INSERT_LIBRARIES/LD_PRELOAD) automatically when entering a Kin workspace.tests/: Integration and regression tests ensuring that virtual filesystem calls behave identically to native OS files under compilers (e.g.gcc,clang,rustc).
To build the VFS shim library:
cargo build --release -p kin-vfsThis produces libkin_vfs_shim.so (Linux) or libkin_vfs_shim.dylib (macOS), which is copied into ~/.kin/lib by the installer.