1 2 3 4 5 6 7 8 9 10
use std::os; use std::io::File; fn main() { let dst = Path::new(os::getenv("OUT_DIR").unwrap()); let mut f = File::create(&dst.join("hello.rs")).unwrap(); f.write_str(" pub const SIX_BY_NINE: u32 = 0o42; ").unwrap(); }