summaryrefslogtreecommitdiff
path: root/build.rs
blob: cc7a62c9bcd9c8d89c6779967995c388d0b49fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
use std::fs::{read, write};
use std::path::PathBuf;

fn main() {
    let py = read("cloud-init.py").unwrap();
    let py = String::from_utf8_lossy(&py).to_string();

    let mut path: PathBuf = std::env::var("OUT_DIR").unwrap().into();
    path.push("cloud-init.rs");
    write(&path, format!("r#\"{}\"#\n", py)).unwrap();
}