autocommit 2022-02-06 03:46:03 CET
This commit is contained in:
parent
59ce74681a
commit
c92346324b
60 changed files with 1292 additions and 1958 deletions
29
build/build.rs
Normal file
29
build/build.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
use std::fs::{File, OpenOptions};
|
||||
use std::{env, io};
|
||||
use std::io::BufWriter;
|
||||
use std::path::PathBuf;
|
||||
|
||||
mod enums;
|
||||
mod wire;
|
||||
|
||||
fn open(s: &str) -> io::Result<BufWriter<File>> {
|
||||
let mut path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
path.push(s);
|
||||
Ok(BufWriter::new(
|
||||
OpenOptions::new()
|
||||
.create(true)
|
||||
.write(true)
|
||||
.truncate(true)
|
||||
.open(path)?,
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
wire::main()?;
|
||||
|
||||
enums::main()?;
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue