diff --git a/crates/tools/windows/Cargo.toml b/crates/tools/windows/Cargo.toml index c44909b5dc..cbafd2127a 100644 --- a/crates/tools/windows/Cargo.toml +++ b/crates/tools/windows/Cargo.toml @@ -3,3 +3,6 @@ name = "tool_windows" version = "0.0.0" edition = "2021" publish = false + +[dependencies] +windows-bindgen = { path = "../../libs/bindgen" } diff --git a/crates/tools/windows/bindings.txt b/crates/tools/windows/src/bindings.txt similarity index 96% rename from crates/tools/windows/bindings.txt rename to crates/tools/windows/src/bindings.txt index 3cd700917c..4068160a2b 100644 --- a/crates/tools/windows/bindings.txt +++ b/crates/tools/windows/src/bindings.txt @@ -1,4 +1,3 @@ ---in crates/libs/bindgen/default --out crates/libs/windows/src/lib.rs --config package no-bindgen-comment --config prepend:Windows.Win32.Foundation.WIN32_ERROR=#[must_use] diff --git a/crates/tools/windows/src/main.rs b/crates/tools/windows/src/main.rs index c56c95b4ee..7a1ce97416 100644 --- a/crates/tools/windows/src/main.rs +++ b/crates/tools/windows/src/main.rs @@ -1,14 +1,6 @@ -fn main() { - let mut command = std::process::Command::new("cargo"); +use windows_bindgen::*; - command.args([ - "run", - "-p", - "riddle", - "--", - "--etc", - "crates/tools/windows/bindings.txt", - ]); - - assert!(command.status().unwrap().success()); +fn main() -> Result<()> { + bindgen(["--etc", "crates/tools/windows/src/bindings.txt"])?; + Ok(()) }