Happy new year everybody! It’s finally time to reveal a project I have been working on over several weekends of the past year. It’s also t

An implementation of the NTFS filesystem in a Rust crate

submited by
Style Pass
2022-01-14 08:30:05

Happy new year everybody! It’s finally time to reveal a project I have been working on over several weekends of the past year. It’s also the next building block on my mission to write a ReactOS/Windows bootloader in Rust.

ntfs is a Rust library that implements the low-level structures of the NTFS filesystem. For those of you who are not running Windows: NTFS is the primary filesystem in Windows, from Windows NT’s release in 1993 up to the current Windows 11. Unlike FAT32, NTFS has no practical limits for file and partition sizes, comes with B-Tree Indexes for faster lookups, and adds a few resilience and efficiency features (such as journaling, compression, and sparse files). This plethora of features combined with the lack of official documentation is also what has kept the number of alternative NTFS implementations low. Although you can expect NTFS on pretty much every external hard drive you buy in a store, it never replaced FAT32 as the filesystem of choice for multiplatform data exchange.

Like my previous nt-hive crate, the ntfs crate supports Rust’s no_std environment and is therefore not tied to a specific platform API. It aims to be embedded in firmware-level code and kernel-mode filesystem drivers just as well as in user-mode applications.

Leave a Comment