serial 0.4.0

Rust library for accessing serial ports.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate serial;

#[cfg(unix)]
fn main() {
    use std::path::Path;

    serial::open("/dev/ttyUSB0").unwrap();
    serial::open(Path::new("/dev/ttyUSB0")).unwrap();
    serial::unix::TTYPort::open(Path::new("/dev/ttyUSB0")).unwrap();
}

#[cfg(windows)]
fn main() {
    serial::open("COM1").unwrap();
    serial::windows::COMPort::open("COM1").unwrap();
}