#serde #nine

bin+lib nine

The 9p protocol as a serde format and message types

8 releases (4 breaking)

0.5.0 Nov 8, 2019
0.4.0 Nov 6, 2018
0.3.0 Sep 17, 2018
0.2.1 Sep 16, 2018
0.1.2 Jul 20, 2016

#139 in Parser implementations

Download history 2/week @ 2020-01-28 5/week @ 2020-02-04 9/week @ 2020-02-11 26/week @ 2020-02-18 25/week @ 2020-02-25 17/week @ 2020-03-03 2/week @ 2020-03-10 32/week @ 2020-03-17 25/week @ 2020-03-24 1/week @ 2020-03-31 35/week @ 2020-04-07 33/week @ 2020-04-14 4/week @ 2020-04-21 6/week @ 2020-04-28 3/week @ 2020-05-05

70 downloads per month
Used in nine-memfs

MPL-2.0 license

1.5K SLoC

nine   Latest Version Rustc Version 1.34.2 ![Build Status]

The 9p protocol as a serde format and message types.

This crate contains structs representing the various types of messages in the 9p2000 protocol (with other versions coming soon), as well as a serializer and deserializer for the wire format for those messages.

There is not an included server implementation or abstraction.

The purpose of this design is to allow for easy extensibility and experimentation with the protocol.


This library is in its early stages of development, and thus may have large, backwards-incompatible changes that occur. User discretion is adviced.

Usage example

To connect to a 9p server and start version negotiation:

use std::io::prelude::*;
use std::net::TcpStream;
use nine::ser::*;
use nine::de::*;
use nine::p2000::*;

let connection = TcpStream::connect("").unwrap();
let version = Tversion { tag: NOTAG, msize: u32::max_value(), version: "9p2000".into() };
let serialized_message: Vec<u8> = into_bytes(&version).unwrap();

Client Binary

nine can also be used as a simple one-shot 9p client, a-la plan9port's 9p command.

Currently only non-authed explicitly-attached read to a unix socket is implemented.


# set up a server to listen at /tmp/9ptest, then:
$ nine -a /tmp/9ptest read /foo

Special Thanks

Casey Rodarmor for collaborating on the initial design.

The countless others in the rust community that have answered my questions.


~26K SLoC