Skip to content

Commit 9b17c65

Browse files
committed
tool_core
1 parent 922159f commit 9b17c65

File tree

4 files changed

+10
-29
lines changed

4 files changed

+10
-29
lines changed

crates/tools/core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ name = "tool_core"
33
version = "0.0.0"
44
edition = "2021"
55
publish = false
6+
7+
[dependencies.windows-bindgen]
8+
path = "../../libs/bindgen"

crates/tools/core/bindings.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
--in crates/libs/metadata/default
21
--out crates/libs/core/src/imp/bindings.rs
3-
--config FLATTEN SYS MINIMAL
2+
--config flatten sys minimal
43

54
--filter
65
Windows.Win32.Foundation.CloseHandle

crates/tools/core/com_bindings.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
--in crates/libs/metadata/default
21
--out crates/libs/core/src/imp/com_bindings.rs
3-
--config FLATTEN MINIMAL
2+
--config flatten minimal
43

54
--filter
65
Windows.Foundation.IReference

crates/tools/core/src/main.rs

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
1-
fn main() {
2-
let mut command = std::process::Command::new("cargo");
1+
use windows_bindgen::*;
32

4-
command.args([
5-
"run",
6-
"-p",
7-
"riddle",
8-
"--",
9-
"--etc",
10-
"crates/tools/core/bindings.txt",
11-
]);
12-
13-
assert!(command.status().unwrap().success());
14-
15-
let mut command = std::process::Command::new("cargo");
16-
17-
command.args([
18-
"run",
19-
"-p",
20-
"riddle",
21-
"--",
22-
"--etc",
23-
"crates/tools/core/com_bindings.txt",
24-
]);
25-
26-
assert!(command.status().unwrap().success());
3+
fn main() -> Result<()> {
4+
bindgen(["--etc", "crates/tools/core/bindings.txt"])?;
5+
bindgen(["--etc", "crates/tools/core/com_bindings.txt"])?;
6+
Ok(())
277
}

0 commit comments

Comments
 (0)