13 releases

0.5.0 Jan 17, 2024
0.4.0 Jan 9, 2023
0.3.4 Jan 9, 2023
0.3.3 Aug 30, 2022
0.1.1 Nov 13, 2019

#391 in Network programming

Download history 9587/week @ 2024-01-23 12197/week @ 2024-01-30 9005/week @ 2024-02-06 8297/week @ 2024-02-13 10652/week @ 2024-02-20 14461/week @ 2024-02-27 11476/week @ 2024-03-05 13101/week @ 2024-03-12 13767/week @ 2024-03-19 11770/week @ 2024-03-26 13281/week @ 2024-04-02 12988/week @ 2024-04-09 13579/week @ 2024-04-16 13906/week @ 2024-04-23 10897/week @ 2024-04-30 9953/week @ 2024-05-07

50,739 downloads per month
Used in 14 crates (8 directly)

Apache-2.0

26KB
466 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

~5–14MB
~154K SLoC