Skip to content

Commit

Permalink
tool_core
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Aug 15, 2023
1 parent 922159f commit 9b17c65
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 29 deletions.
3 changes: 3 additions & 0 deletions crates/tools/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ name = "tool_core"
version = "0.0.0"
edition = "2021"
publish = false

[dependencies.windows-bindgen]
path = "../../libs/bindgen"
3 changes: 1 addition & 2 deletions crates/tools/core/bindings.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
--in crates/libs/metadata/default
--out crates/libs/core/src/imp/bindings.rs
--config FLATTEN SYS MINIMAL
--config flatten sys minimal

--filter
Windows.Win32.Foundation.CloseHandle
Expand Down
3 changes: 1 addition & 2 deletions crates/tools/core/com_bindings.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
--in crates/libs/metadata/default
--out crates/libs/core/src/imp/com_bindings.rs
--config FLATTEN MINIMAL
--config flatten minimal

--filter
Windows.Foundation.IReference
Expand Down
30 changes: 5 additions & 25 deletions crates/tools/core/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
fn main() {
let mut command = std::process::Command::new("cargo");
use windows_bindgen::*;

command.args([
"run",
"-p",
"riddle",
"--",
"--etc",
"crates/tools/core/bindings.txt",
]);

assert!(command.status().unwrap().success());

let mut command = std::process::Command::new("cargo");

command.args([
"run",
"-p",
"riddle",
"--",
"--etc",
"crates/tools/core/com_bindings.txt",
]);

assert!(command.status().unwrap().success());
fn main() -> Result<()> {
bindgen(["--etc", "crates/tools/core/bindings.txt"])?;
bindgen(["--etc", "crates/tools/core/com_bindings.txt"])?;
Ok(())
}

0 comments on commit 9b17c65

Please sign in to comment.