#virtual-filesystem #vfs #virtual

nightly oak-vfs

Virtual file system abstraction for the Oak framework, supporting disk and memory-based storage

6 releases

Uses new Rust 2024

new 0.0.6 Mar 4, 2026
0.0.5 Mar 3, 2026
0.0.4 Feb 15, 2026
0.0.2 Jan 30, 2026

#1022 in Filesystem

Download history 20/week @ 2026-01-20 112/week @ 2026-01-27 103/week @ 2026-02-03 277/week @ 2026-02-10 157/week @ 2026-02-17 200/week @ 2026-02-24

770 downloads per month
Used in 127 crates (126 directly)

MPL-2.0 license

315KB
5K SLoC

🚀 oak-vfs

Crates.io Documentation

Virtual File System for Oak Language Tools — A unified abstraction for file system operations supporting both in-memory and disk-based storage.

🎯 Why oak-vfs?

Language tools need to access files from various sources — local disk, in-memory buffers, remote storage, or virtual projects. oak-vfs provides a unified abstraction layer that decouples language analysis from storage implementation.

✨ Key Features

  • 📁 Unified AbstractionVfs trait for any file source
  • 💾 Memory VFS — In-memory projects, testing, sandboxed environments
  • 💿 Disk VFS — Real file system with watching support (feature-gated)
  • 📊 Line MappingLineMap for byte offset to line/column translation
  • 🔄 Serde Support — Optional serialization for metadata and line maps

🏗️ Architecture

  • Vfs trait — Core abstraction for file system access
  • MemoryVfs — In-memory file system for testing
  • DiskVfs — Real file system with watching (feature: disk)
  • LineMap — Efficient line/column mapping

🔗 Ecosystem Integration

Used by oak-lsp for workspace file management, oak-mcp for project analysis, and language servers for cross-file navigation.

📖 Documentation

For usage examples and API details, see the API documentation.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Dependencies

~8–21MB
~167K SLoC