graph_generation_language 0.0.1

A domain-specific language for creating and manipulating graphs through declarative syntax.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::env;
use std::fs;
use std::path::Path;

fn main() {
    let out_dir = env::var("OUT_DIR").unwrap();
    let dest_path = Path::new(&out_dir).join("ggl.pest");

    // Copy the pest file to the output directory
    if Path::new("ggl.pest").exists() {
        fs::copy("ggl.pest", &dest_path).unwrap();
    } else if Path::new("src/ggl.pest").exists() {
        fs::copy("src/ggl.pest", &dest_path).unwrap();
    }

    println!("cargo:rerun-if-changed=ggl.pest");
    println!("cargo:rerun-if-changed=src/ggl.pest");
}