Skip to content

Commit 7d062c6

Browse files
authored
Update windows bindings and use windows-targets (#653)
This synchronizes the API definitions with std. Trouble is, std uses its own definition of the `windows_targets::link!` macro so I've used a path hack to include it in this crate when used as a dependency of std. Otherwise the `windows-targets` crate is used.
1 parent fc37b22 commit 7d062c6

File tree

5 files changed

+130
-386
lines changed

5 files changed

+130
-386
lines changed

Cargo.lock

+60-89
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ cpp_demangle = { default-features = false, version = "0.4.0", optional = true, f
3838
"alloc",
3939
] }
4040

41+
[target.'cfg(windows)'.dependencies]
42+
windows-targets = "0.52.6"
43+
4144
[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
4245
miniz_oxide = { version = "0.8", default-features = false }
4346
addr2line = { version = "0.24.0", default-features = false }

bindings.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--out src/windows_sys.rs
2-
--config std flatten
2+
--config sys flatten
33
--filter
44
Windows.Win32.Foundation.CloseHandle
55
Windows.Win32.Foundation.FALSE

crates/as-if-std/Cargo.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ default-features = false
2626
optional = true
2727
features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']
2828

29-
[build-dependencies]
30-
# Dependency of the `backtrace` crate
31-
windows-bindgen = "0.56"
29+
[target.'cfg(windows)'.dependencies]
30+
windows-targets = "0.52.6"
3231

3332
[features]
3433
default = ['backtrace']

0 commit comments

Comments
 (0)