timeout_io 0.2.6

This library provides a simple timeout-based API for IO-operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate gcc;

fn main() {
	// Compile libselect
	let mut gcc = gcc::Build::new();
	
	// Compile lib
	match true {
		_ if cfg!(unix) => gcc.file("libselect/libselect_unix.c").compile("select"),
		_ if cfg!(windows) => gcc.file("libselect/libselect_win.c").compile("select"),
		_ => panic!("Unsupported platform for libselect")
	}
	
	// Link lib
	println!("cargo:rustc-link-lib=static=select");
}