16 unstable releases (6 breaking)

0.7.1 Apr 10, 2025
0.7.0 Dec 25, 2024
0.6.0 Nov 13, 2024
0.5.0 Jan 17, 2024
0.1.1 Nov 13, 2019

#362 in Asynchronous

Download history 16527/week @ 2025-02-01 20052/week @ 2025-02-08 19589/week @ 2025-02-15 24514/week @ 2025-02-22 22649/week @ 2025-03-01 22349/week @ 2025-03-08 21053/week @ 2025-03-15 21527/week @ 2025-03-22 22066/week @ 2025-03-29 23781/week @ 2025-04-05 20248/week @ 2025-04-12 21016/week @ 2025-04-19 25570/week @ 2025-04-26 25133/week @ 2025-05-03 23649/week @ 2025-05-10 20021/week @ 2025-05-17

98,772 downloads per month
Used in 31 crates (16 directly)

Apache-2.0

30KB
504 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

~5–14MB
~165K SLoC