aboutsummaryrefslogtreecommitdiff
path: root/serde-tests/build.rs
blob: 7acbef5f68b1110b60270e948a108bd2a91e203e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate syntex;
extern crate serde_codegen;

use std::env;
use std::path::Path;

fn main() {
    let out_dir = env::var_os("OUT_DIR").unwrap();

    let src = Path::new("test.rs.in");
    let dst = Path::new(&out_dir).join("test.rs");

    let mut registry = syntex::Registry::new();

    serde_codegen::register(&mut registry);
    registry.expand("", &src, &dst).unwrap();
}