muele/red/build.rs

14 lines
372 B
Rust
Raw Permalink Normal View History

2022-10-16 13:44:43 +00:00
fn main() {
let async_main = format!("{}/main.rs", std::env::var("OUT_DIR").unwrap());
std::fs::write(
async_main,
r#"
#[cfg_attr(feature = "pasts/web", wasm_bindgen(start))]
pub fn main() {
let executor = Executor::default();
executor.spawn(App::main(executor.clone()));
}"#,
)
.unwrap();
}