2 unstable releases

0.2.0 Jun 8, 2024
0.1.0 Jun 2, 2024

#579 in Unix APIs

Download history 19/week @ 2024-06-23 22/week @ 2024-06-30 1/week @ 2024-07-14 23/week @ 2024-07-28 6/week @ 2024-08-04 21/week @ 2024-08-11 2/week @ 2024-08-18 2/week @ 2024-08-25 1/week @ 2024-09-01 8/week @ 2024-09-15 32/week @ 2024-09-22 6/week @ 2024-09-29 11/week @ 2024-10-06

57 downloads per month
Used in xfs-fuse

MIT/Apache

29KB
637 lines

mdconfig

Rust bindings to FreeBSD's md(4) driver.

md devices are memory disks, that can be backed by RAM, swap, or a file. They can be useful for temporary storage, and they're very useful for working with disk images as files. This crate provides bindings to md that are equivalent to what the mdconfig(8) utility provides, but Rustier.

Build Status Crates.io

Documentation

Usage

See the examples in the API docs. The general idea is to create a Builder struct, set various options, and then construct the Md device from that. Most applications will then open the Md device's path with the standard file system API. When complete, the Md object will tell the kernel to deallocate the md device upon Drop.

Platforms

This crate only works on FreeBSD. Similarly named drivers in NetBSD and DragonflyBSD actually have very different APIs.

Minimum Supported Rust Version (MSRV)

mdconfig does not guarantee any specific MSRV. Rather, it guarantees compatibility with the oldest rustc shipped in the FreeBSD package collection.

License

mdconfig is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, and LICENSE-MIT for details.

Dependencies

~1.5MB
~35K SLoC