write_tool_rs/build.rs

9 lines
337 B
Rust
Raw Normal View History

2024-07-08 16:39:36 +08:00
fn main(){
use std::path::PathBuf;
use std::env;
println!("cargo:rerun-if-changed=src/ui/main.fl");
let g = fl2rust::Generator::default();
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
g.in_out("src/ui/main.fl", out_path.join("main_ui.rs").to_str().unwrap()).expect("Failed to generate ui code");
}