How guille-ux/headerfs works
Project type and purpose
• This is a C-based filesystem module (“HeaderFs”) intended to be part of an operating system kernel. It provides a minimal, header-based filesystem interface plus a corresponding ANSI C driver for disk I/O.
• It’s not a full-stack application or microservice. Rather it’s a systems-level library/driver component meant to plug into a larger OS kernel’s VFS layer.
File structure
• Top-level:
• fs.h – Public filesystem API header.
• LICENSE, README.md
• drivers/ansi-c:
• fs.c, fs.h – Filesystem implementation.
• disk.c, disk.h – Raw disk I/O driver in ANSI C.
• libs:
• disk.h – Shared disk interface definitions.
• io.h – Generic I/O abstractions (block reads/writes).
• Pattern: a two-layer architecture
• Core FS layer (fs.c/.h)
• Underlying disk driver layer (disk.c/.h)
• Common I/O abstractions in libs
Key README insights
• “Header based FileSystem”: small, simple FS.
• Not compatible with ext4/FAT; purely in-kernel.
• Planned future compatibility layers.
Detailed separation of components
• Internal division of HeaderFs:
• Metadata management (superblock, inodes)
• Data block allocation
• How the I/O abstraction library could be swapped out or extended.
• Where new filesystem compatibility layers would hook in (future ext4/FAT adapters).