Crates.io | mdconfig |
lib.rs | mdconfig |
version | 0.2.0 |
source | src |
created_at | 2024-06-02 20:45:23.798224 |
updated_at | 2024-06-08 16:58:02.238721 |
description | Rust bindings for FreeBSD's md devices |
homepage | |
repository | https://github.com/asomers/mdconfig-rs |
max_upload_size | |
id | 1259484 |
size | 41,407 |
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.
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.
This crate only works on FreeBSD. Similarly named drivers in NetBSD and DragonflyBSD actually have very different APIs.
mdconfig
does not guarantee any specific MSRV. Rather, it guarantees
compatibility with the oldest rustc shipped in the FreeBSD package collection.
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.