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

#330 in Network programming

Download history 13687/week @ 2024-07-04 14183/week @ 2024-07-11 13756/week @ 2024-07-18 11857/week @ 2024-07-25 13021/week @ 2024-08-01 11597/week @ 2024-08-08 14660/week @ 2024-08-15 13090/week @ 2024-08-22 12491/week @ 2024-08-29 12739/week @ 2024-09-05 13819/week @ 2024-09-12 12507/week @ 2024-09-19 14880/week @ 2024-09-26 14871/week @ 2024-10-03 14152/week @ 2024-10-10 18402/week @ 2024-10-17

64,746 downloads per month
Used in 15 crates (9 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–13MB
~150K SLoC