File: README.md

package info (click to toggle)
nbdkit 1.42.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,696 kB
  • sloc: ansic: 59,224; sh: 16,793; makefile: 6,463; python: 1,837; cpp: 1,116; ml: 504; perl: 502; tcl: 62
file content (48 lines) | stat: -rw-r--r-- 1,188 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# NBDKit

Rust bindings to the Network Block Device Kit library.

[![Crates.io](https://img.shields.io/crates/v/nbdkit.svg)](https://crates.io/crates/nbdkit)
[![Documentation](https://docs.rs/nbdkit/badge.svg)](https://docs.rs/nbdkit)
[![Build Status](https://api.cirrus-ci.com/github/libguestfs/nbdkit.svg)](https://cirrus-ci.com/github/libguestfs/nbdkit)

## 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:

```toml
[dependencies]
nbdkit = "0.1.0"
```

```rust
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.63.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.