| Crates.io | blockdev |
| lib.rs | blockdev |
| version | 0.1.2 |
| created_at | 2025-02-24 04:19:39.263471+00 |
| updated_at | 2025-02-24 04:49:58.495132+00 |
| description | A Rust library for parsing and working with lsblk JSON output, providing type-safe block device representation and utilities for Linux |
| homepage | https://github.com/wiggels/blockdev |
| repository | https://github.com/wiggels/blockdev |
| max_upload_size | |
| id | 1566938 |
| size | 29,082 |
blockdev is a lightweight Rust library for parsing and working with the output of the lsblk --json command on Linux. It leverages Serde for JSON deserialization, providing a type-safe representation of block devices and a set of utilities to inspect their properties.
lsblk --json into Rust data structures./).Add blockdev to your Cargo.toml:
[dependencies]
blockdev = "0.1.0"
Then run:
cargo build
use blockdev::get_devices;
fn example_devices() -> Result<BlockDevices, Box<dyn Error>> {
let devices = get_devices();
devices
}