msgpack 0.1.0

MessagePack serialization implementation for Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![feature(phase)]

#[phase(plugin, link)] extern crate log;
extern crate msgpack;

use std::io::{File};
use std::os::args;

fn main() {
  let contents = File::open(&Path::new(args()[1].clone())).read_to_end().ok().unwrap();
  debug!("{}", contents);

  let a: msgpack::Value = msgpack::from_msgpack(contents.as_slice()).ok().unwrap();
  debug!("{}", a);
}