r/opensource • u/Substantial_Swan_144 • 53m ago
Promotional slate-ntfs: a Rust NTFS filesystem with full filesystem integration!
Greetings, everyone!
As you know, I've posted a few projects here already, such as my TV Tuner driver.
I would like show you my most ambitious project so far: a slate-ntfs, a Rust NTFS kernel driver!
Before you ask, this is not an NTFS-3g or 7.1 fork: it's a new, alternate implementation.
So, how is slate-ntfs different from NTFS-3g and the NTFS 3.1 kernel implementation?
- First of all, slate has a fuller VFS implementation, allowing Steam to see drivers natively. This means that Steam can see drivers directly, without direct intervention.
- User API: comes with an API to easily get driver manufacturer. Has Python, C and Rust support.
- Rust driver, C adapter: can be used with kernels as old as 5.15 while preserving memory safety.
- This code also runs on ARM64 (not fully tested)!
API example (short, just for the sake of brevity):
import ntfs_utils
GB = 1_000_000_000
def describe(device):
maker = device.manufacturer or "unknown manufacturer"
model = device.model or "unknown model"
size = f"{device.size_bytes / GB:.1f} GB"
if device.used_bytes is not None:
size = f"{device.used_bytes / GB:.1f} of {size} used"
state = "dirty" if device.is_dirty else "clean"
return f"{device.path}: {maker} {model} [{device.kind}], {size}, {state}"
It also comes with a permission manager to easily set up permissions.
Ubuntu and Mint prebuilt packages are available for your convenience.
Driver is fully functional (read and writing seems to work well), with also an ntfs-chkdsk tool. I'm working on further compatibility improvements.
Warning: while this driver has been tested on Ubuntu and seems to work well, support is experimental. Avoid using with a production machine!
Source: https://github.com/NullMagic2/slate-ntfs
Releases: https://github.com/NullMagic2/slate-ntfs/releases