Skip to content

Instantly share code, notes, and snippets.

@wirelyre
Created February 9, 2019 21:59
Show Gist options
  • Save wirelyre/51523992e008e08d8895ebce83222dde to your computer and use it in GitHub Desktop.
Save wirelyre/51523992e008e08d8895ebce83222dde to your computer and use it in GitHub Desktop.
use std::env;
use std::fs::File;
use std::io::Write;
use std::path::Path;
fn main() {
let dest = env::var("OUT_DIR").unwrap();
let mut file = File::create(&Path::new(&dest).join("ice.rs")).unwrap();
writeln!(&mut file, "#[derive(Clone)] pub struct Little;").unwrap();
writeln!(&mut file, "#[derive(Clone)] pub struct Big(").unwrap();
for _ in 0..614 {
writeln!(&mut file, "Little,").unwrap();
}
writeln!(&mut file, ");").unwrap();
}
include!(concat!(env!("OUT_DIR"), "/ice.rs"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment