Initial import of p9 rust crate

To support building newer versions of crosvm in AOSP.

Bug: 171318426
Change-Id: I12b2b84c32696f4e0f5dfeca32c1bfac67f07f7e
19 files changed
tree: 9918ff34d4bf62f4a02ea8f4ea57cf97cfe8250b
  1. .clang-format
  2. .gitignore
  3. Cargo.toml
  4. LICENSE
  5. METADATA
  6. MODULE_LICENSE_BSD
  7. OWNERS
  8. README.md
  9. fuzz/
  10. src/
  11. wire_format_derive/
README.md

p9 - Server implementation of the 9p file system protocol

This directory contains the protocol definition and a server implementation of the 9p file system protocol.

  • wire_format_derive - A procedural macro that derives the serialization and de-serialization implementation for a struct into the 9p wire format.
  • src/protocol - Defines all the messages used in the 9p protocol. Also implements serialization and de-serialization for some base types (integers, strings, vectors) that form the foundation of all 9p messages. Wire format implementations for all other messages are derived using the wire_format_derive macro.
  • src/server.rs - Implements a full 9p server, carrying out file system requests on behalf of clients.