#nbd #block-device #network-block-device #networking #api-bindings

nbdkit

Rust bindings to the NBDKit framework for creating Network Block Device servers

3 releases (breaking)

0.3.0 Jul 20, 2023
0.2.0 Oct 18, 2021
0.1.0 Oct 27, 2020

#648 in Filesystem

Download history 305/week @ 2023-12-12 393/week @ 2023-12-19 204/week @ 2023-12-26 591/week @ 2024-01-02 305/week @ 2024-01-09 345/week @ 2024-01-16 569/week @ 2024-01-23 357/week @ 2024-01-30 418/week @ 2024-02-06 748/week @ 2024-02-13 278/week @ 2024-02-20 797/week @ 2024-02-27 201/week @ 2024-03-05 455/week @ 2024-03-12 709/week @ 2024-03-19 540/week @ 2024-03-26

1,948 downloads per month

BSD-2-Clause

61KB
899 lines

NBDKit

Rust bindings to the Network Block Device Kit library.

Crates.io Documentation Build Status

Overview

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.

Usage

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, ...});

Minimum Supported Rust Version (MSRV)

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.

License

nbdkit is primarily distributed under the 2-clause BSD liense. See LICENSE for details.

Dependencies

~57–500KB
~11K SLoC