1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-24 20:31:10 +00:00
ibis/build.rs

21 lines
482 B
Rust
Raw Permalink Normal View History

use std::{
fs::{create_dir_all, File},
io::Result,
path::Path,
};
/// Create placeholders for wasm files so that `cargo check` etc work without explicitly building
/// frontend.
fn main() -> Result<()> {
create_dir_all("assets/dist/")?;
let js = "assets/dist/ibis.js";
if !Path::new(js).exists() {
File::create(js)?;
}
let wasm = "assets/dist/ibis_bg.wasm";
if !Path::new(wasm).exists() {
File::create(wasm)?;
}
Ok(())
}