Crates.io | nbdkit |
lib.rs | nbdkit |
version | 0.3.0 |
source | src |
created_at | 2020-10-27 16:58:06.431921 |
updated_at | 2023-07-20 20:15:59.253287 |
description | Rust bindings to the NBDKit framework for creating Network Block Device servers |
homepage | http://libguestfs.org/ |
repository | https://gitlab.com/nbdkit/nbdkit |
max_upload_size | |
id | 306047 |
size | 107,904 |
Rust bindings to the Network Block Device Kit library.
NBDKit is a framework for developing Network Block Device servers. Most of the logic lives in the C code, but there are plugins to implement a server in another language, such as Rust.
To create an NBD server in Rust, you must implement the nbdkit::Server
trait, and register it with nbdkit::plugin!
, like this:
[dependencies]
nbdkit = "0.1.0"
use nbdkit::*;
#[derive(Default)]
struct MyPlugin {
// ...
}
impl Server for MyPlugin {
// ...
}
plugin!(MyPlugin {write_at, trim, ...});
nbdkit
is supported on Rust 1.46.0 and higher. The MSRV will not be
changed in the future without raising the major or minor version.
nbdkit
is primarily distributed under the 2-clause BSD liense. See
LICENSE for details.