Online / 5 & 6 February 2022


Implementing the NTFS filesystem in Rust

Reusable code from firmware level up to user-mode

Time has come to rewrite our system software in Rust and leave the pitfalls of C behind. This also includes basics such as filesystem support. I took on the challenge to implement NTFS, the primary filesystem used by Windows, in a Rust crate that is equally usable from the firmware level up to user-mode.

While Rust has been conquering the system software landscape for the past few years, there are next to no examples for implementing filesystems. Likewise, NTFS only has a single major open-source implementation known as ntfs-3g, and it was developed in C over a decade ago.

This talk will cover my motivation for targeting NTFS and various use cases for such a Rust crate. I will introduce you to the internals of the NTFS filesystem, how they influenced the crate's design, and how Rust's features can be leveraged to create a safe and maintainable implementation. My talk will cover the current implementation, but also the necessary iterations until I got there. Finally, we will also deal with the current limitations of the Rust ecosystem and possible future improvements to the crate.

You will see that Rust has many advantages for implementing filesystems, and I hope to see more such crates in the future.


Photo of Colin Finck Colin Finck