Expand description
Tiny vsock is a Rust library that provides an abstraction over vsock (AF_VSOCK) sockets
for communication between hosts and virtual machines or enclaves. It offers a simple API
for creating, connecting, binding, listening, accepting, sending, and receiving data through
vsock sockets. The library is designed to be efficient and easy to use, with built-in retry
mechanisms for connection attempts and chunked data transfer for optimal performance.
§Features
std-io: Enables implementation of the standardReadandWritetraits forVsock, allowing it to be used with standard Rust I/O patterns.
§Examples
enclave-echo-service— binds, accepts one connection, receives data, and echoes it back; run inside the enclaveparent-echo-client— connects to the enclave service, sends a message, and reads the echo; run on the parent instancestd_io_echo— demonstratesstd::io::Read/std::io::WriteviaBufReaderandflush; requires--features std-io
Structs§
- Vsock
- Abstraction over a vsock (
AF_VSOCK) socket for communication between hosts and virtual machines or enclaves.