-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
26 lines (17 loc) · 742 Bytes
/
build.rs
File metadata and controls
26 lines (17 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use std::{collections::HashMap, path::Path};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let current_dir = std::env::current_dir()?.canonicalize()?;
let idl_source_path = current_dir.join("idls/vortex_contracts.json");
let idl_mod_path = current_dir.join("src/vortex_idl.rs");
// generate_idl_types(&idl_source_path, idl_mod_path.as_path())?;
Ok(())
}
// fn generate_idl_types(
// idl_source_path: &Path,
// idl_mod_path: &Path,
// ) -> Result<(), Box<dyn std::error::Error>> {
// let idl_mod_rs = vortex_idl_gen::generate_rust_types(&idl_source_path)
// .map_err(|err| format!("generating IDL failed: {err:?}"))?;
// std::fs::write(&idl_mod_path, idl_mod_rs)?;
// Ok(())
// }