17 unstable releases (6 breaking)

0.7.2 Aug 16, 2025
0.7.1 Apr 10, 2025
0.7.0 Dec 25, 2024
0.6.0 Nov 13, 2024
0.1.1 Nov 13, 2019

#103 in Asynchronous

Download history 25192/week @ 2025-08-07 27786/week @ 2025-08-14 29649/week @ 2025-08-21 25243/week @ 2025-08-28 28205/week @ 2025-09-04 28456/week @ 2025-09-11 28424/week @ 2025-09-18 37435/week @ 2025-09-25 40083/week @ 2025-10-02 45473/week @ 2025-10-09 41104/week @ 2025-10-16 45378/week @ 2025-10-23 48320/week @ 2025-10-30 50620/week @ 2025-11-06 51251/week @ 2025-11-13 49471/week @ 2025-11-20

208,455 downloads per month
Used in 58 crates (22 directly)

Apache-2.0

30KB
505 lines

tokio-vsock

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

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–17MB
~157K SLoC