Import vsock crate. am: 641348654d am: 7aa46c1987 am: 9e6fe586d8 am: cf9e33f54e

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vsock/+/1466266

Change-Id: I5bded9aedbb0149f807c004b7e63a00210bda9de
tree: 42dafdc8ac23493aa189bbf8a0de6dd233e5a9f4
  1. .cargo/
  2. src/
  3. tests/
  4. .cargo_vcs_info.json
  5. .gitignore
  6. Android.bp
  7. Cargo.toml
  8. Cargo.toml.orig
  9. LICENSE
  10. Makefile
  11. METADATA
  12. MODULE_LICENSE_APACHE2
  13. OWNERS
  14. README.md
README.md

vsock-rs

Virtio socket support for Rust. Implements VsockListener and VsockStream which are analogous to the std::net::TcpListener and std::net::TcpStream types.

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