-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove remaining recursive calls to
cargo
(#3113)
- Loading branch information
1 parent
d33dcf7
commit 48db09f
Showing
6 changed files
with
99 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
fn main() { | ||
let mut command = std::process::Command::new("cargo"); | ||
let command: Vec<String> = vec![ | ||
"--in".to_owned(), | ||
"../component/component.winmd".to_owned(), | ||
format!("{}\\System32\\WinMetadata", env!("windir")), | ||
"--out".to_owned(), | ||
"src/bindings.rs".to_owned(), | ||
"--filter".to_owned(), | ||
"test_component".to_owned(), | ||
"--config".to_owned(), | ||
"no-bindgen-comment".to_owned(), | ||
]; | ||
|
||
command.args([ | ||
"run", | ||
"-p", | ||
"riddle", | ||
"--target-dir", | ||
"../../../target/test_component_client", // TODO: workaround for https://github.com/rust-lang/cargo/issues/6412 | ||
"--", | ||
"--in", | ||
"../component/component.winmd", | ||
&format!("{}\\System32\\WinMetadata", env!("windir")), | ||
"--out", | ||
"src/bindings.rs", | ||
"--filter", | ||
"test_component", | ||
"--config", | ||
"no-bindgen-comment", | ||
]); | ||
|
||
if !command.status().unwrap().success() { | ||
panic!("Failed to run riddle"); | ||
} | ||
windows_bindgen::bindgen(&command).unwrap_or_else(|e| { | ||
panic!( | ||
"Failed to run bindgen: {e:?}\nArgs: riddle.exe {args}", | ||
args = command.join(" ") | ||
) | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters