vcd-ng 0.2.0

Read and write VCD (Value Change Dump) files, the next generation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::io;

/// A simple demo that uses the reader and writer to round-trip a VCD file from stdin to stdout
pub fn main() {
    let mut stdin = io::stdin();
    let mut stdout = io::stdout();

    let mut reader = vcd_ng::Parser::new(&mut stdin);
    let mut writer = vcd_ng::Writer::new(&mut stdout);

    let header = reader.parse_header().unwrap();
    writer.header(&header).unwrap();

    for cmd in reader {
        writer.command(&cmd.unwrap()).unwrap();
    }
}