tokio-vsock

Crates.iotokio-vsock
lib.rstokio-vsock
version0.5.0
sourcesrc
created_at2019-11-12 22:49:16.569286
updated_at2024-01-17 17:19:00.29054
descriptionAsynchronous Virtio socket support for Rust
homepagehttps://github.com/rust-vsock/tokio-vsock
repositoryhttps://github.com/rust-vsock/tokio-vsock
max_upload_size
id180764
size48,726
Andrew Walbran (qwandor)

documentation

README

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
Commit count: 64

cargo fmt