12 releases

0.4.0 Jan 9, 2023
0.3.3 Aug 30, 2022
0.3.2 Jul 11, 2022
0.3.1 May 25, 2021
0.1.1 Nov 13, 2019

#245 in Network programming

Download history 5516/week @ 2022-12-01 5394/week @ 2022-12-08 3431/week @ 2022-12-15 1461/week @ 2022-12-22 2295/week @ 2022-12-29 4509/week @ 2023-01-05 4269/week @ 2023-01-12 3661/week @ 2023-01-19 4742/week @ 2023-01-26 5175/week @ 2023-02-02 5544/week @ 2023-02-09 5999/week @ 2023-02-16 4968/week @ 2023-02-23 4288/week @ 2023-03-02 5446/week @ 2023-03-09 5160/week @ 2023-03-16

20,944 downloads per month
Used in 5 crates (2 directly)

Apache-2.0

23KB
428 lines

tokio-vsock

Asynchronous Virtio socket support for Rust. The implementation is based off of Tokio and Mio's TCPListener and TCPStream interfaces.

tokio-vsock is for the most part pre-alpha quality, so there are probably sharp edges. Please test it thoroughly before using in production. Happy to receive pull requests and issue reports.

Use Cases

The most common use case for tokio-vsock would be writing agents for microvm applications. Examples would include container runtimes.

Usage

Refer to the crate documentation.

Testing

Prerequisites

You will need a recent qemu-system-x86_64 build in your path.

Host

Setup the required Virtio kernel modules:

make kmod

Start the test vm, you can shutdown the vm with the keyboard shortcut Ctrl+A and then x:

make vm

Tests

Run the test suite with:

make check

Dependencies

~4.5–9.5MB
~155K SLoC