There are 2 solutions depending of OS where code is built.
For *nix OS serial.rs library should work fine for rust 0.11.0 build but for supporting rust-0.12.0 an issue was opened and not closed yet.
For Windows stuff (mingw-w64) the serial.rs is not a simple solution because this lib is based on termios calls which are not easily setup for mingw. It comes from point that mingw is built against msvcrt not against glibc (for more information see here).
On Windows a simple solution would be to write a wrapper for library like rs232 by teuniz using rust FFI.
Build library rs232 using mingw gcc;
Create a wrapper in rust;
Short example for Windows looks like this:
extern crate libc;
use libc::{c_int,c_uchar,c_uint};
use std::os;
//
#[link(name = "rs232")]
extern {
fn RS232_OpenComport(comport_number:c_int, baudrate:c_int) ->c_int;
fn RS232_SendByte(comport_number:c_int, byte:c_uchar)->c_int;
fn RS232_CloseComport(comport_number:c_int);
}
static COM10:c_int=9;
fn main() {
let y=unsafe{RS232_OpenComport(COM10, 115200)};
unsafe{
RS232_SendByte(COM10,101);
RS232_SendByte(COM10,100);
}
let cl=unsafe{RS232_CloseComport(COM10)};
}