|
1 | | -# Crate Name |
| 1 | +# vhost-user-backend |
2 | 2 |
|
3 | 3 | ## Design |
4 | 4 |
|
5 | | -TODO: This section should have a high-level design of the crate. |
| 5 | +This crate provides convenient abstractions for implementing `vhost-user` device server backends: |
6 | 6 |
|
7 | | -Some questions that might help in writing this section: |
8 | | -- What is the purpose of this crate? |
9 | | -- What are the main components of the crate? How do they interact which each |
10 | | - other? |
| 7 | +- A vhost-user backend trait (`VhostUserBackend`) |
| 8 | +- A public API for the backend to interact with (`VhostUserDaemon`) |
| 9 | +- An structure including virtio queue related elements (`Vring`) |
| 10 | +- A worker for receiving queue events and forwarding them to the backend. |
11 | 11 |
|
12 | 12 | ## Usage |
13 | 13 |
|
14 | | -TODO: This section describes how the crate is used. |
15 | | - |
16 | | -Some questions that might help in writing this section: |
17 | | -- What traits do users need to implement? |
18 | | -- Does the crate have any default/optional features? What is each feature |
19 | | - doing? |
20 | | -- Is this crate used by other rust-vmm components? If yes, how? |
21 | | - |
22 | | -## Examples |
23 | | - |
24 | | -TODO: Usage examples. |
25 | | - |
26 | | -```rust |
27 | | -use my_crate; |
28 | | - |
29 | | -... |
30 | | -``` |
31 | | - |
32 | | -## License |
33 | | - |
34 | | -**!!!NOTICE**: The BSD-3-Clause license is not included in this template. |
35 | | -The license needs to be manually added because the text of the license file |
36 | | -also includes the copyright. The copyright can be different for different |
37 | | -crates. If the crate contains code from CrosVM, the crate must add the |
38 | | -CrosVM copyright which can be found |
39 | | -[here](https://chromium.googlesource.com/chromiumos/platform/crosvm/+/master/LICENSE). |
40 | | -For crates developed from scratch, the copyright is different and depends on |
41 | | -the contributors. |
| 14 | +Users of this create are expected to implement the `VhostUserBackend` trait and to initialize the execution context by instantiating `VhostUserDaemon` and calling to its `start` method. |
0 commit comments