#msgpack #message-pack #rpc

mpack

An alternative MessagePack implementation for Rust

9 releases

Uses old Rust 2015

0.1.2 Jul 8, 2016
0.1.1 Jul 1, 2016
0.0.6 Jun 28, 2016
0.0.5 Mar 9, 2015
0.0.4 Jan 30, 2015

#6 in #msgpack

Download history 4/week @ 2021-06-26 3/week @ 2021-07-03 5/week @ 2021-07-10 13/week @ 2021-07-17 12/week @ 2021-07-24 21/week @ 2021-07-31 6/week @ 2021-08-07 12/week @ 2021-08-14 4/week @ 2021-08-21 4/week @ 2021-09-11 3/week @ 2021-09-18 10/week @ 2021-09-25 4/week @ 2021-10-02 13/week @ 2021-10-09

54 downloads per month
Used in neovim

MIT license

44KB
908 lines

mpack Build Status

A new MessagePack implementation for Rust.


lib.rs:

A MessagePack implementation for Rust.

use std::net::TcpStream;
use mpack::{Value, write_value};

let mut conn = TcpStream::connect("127.0.0.1:8081").unwrap();

// write values
write(&mut conn, 3 as i32).unwrap();

Reading values is just as easy:

use std::net::TcpStream;
use mpack::{Value, Reader};

let mut conn = TcpStream::connect("127.0.0.1:8081").unwrap();
let mut reader = Reader::new(conn);

let value = reader.read_value().unwrap();
// `value` can be inspected with `match` or converted directly with a convenience method

No runtime deps