Skip to content

Commit

Permalink
git ignore only cppwinrt output
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Sep 5, 2024
1 parent 12a31b4 commit b51e8b0
Show file tree
Hide file tree
Showing 10 changed files with 852 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/target
*.lock
*.winmd
winrt
**/src/winrt
24 changes: 24 additions & 0 deletions crates/tests/winrt/constructors/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "test_constructors"
version = "0.0.0"
edition = "2021"
publish = false

[lib]
crate-type = ["cdylib"]
doc = false
doctest = false

[build-dependencies.windows-bindgen]
workspace = true

[dependencies.windows-core]
workspace = true

[dependencies.windows]
workspace = true
features = [
"implement",
"Foundation",
"Win32_System_WinRT",
]
33 changes: 33 additions & 0 deletions crates/tests/winrt/constructors/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
fn main() {
let mut command = std::process::Command::new("midlrt.exe");
command.args([
"/winrt",
"/nomidl",
"/h",
"nul",
"/metadata_dir",
"../../../libs/bindgen/default",
"/reference",
"../../../libs/bindgen/default/Windows.winmd",
"/winmd",
"metadata.winmd",
"src/metadata.idl",
]);

if !command.status().unwrap().success() {
panic!("Failed to run midlrt");
}

windows_bindgen::bindgen([
"--in",
"metadata.winmd",
"--out",
"src/bindings.rs",
"--filter",
"test_constructors",
"--config",
"implement",
"no-bindgen-comment",
])
.unwrap();
}
Loading

0 comments on commit b51e8b0

Please sign in to comment.