Skip to content

Commit

Permalink
WIP: build: allow windows-core 0.59, windows-targets 0.53
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Jan 13, 2025
1 parent 63f322f commit 8b708e3
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 101 deletions.
120 changes: 32 additions & 88 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ static_assertions = { version = "1.1", default-features = false }

[target.'cfg(windows)'.dependencies]
# Don't increase beyond what Firefox is currently using: https://searchfox.org/mozilla-central/source/Cargo.lock
windows-core = { version = "0.58", default-features = false }
windows-targets = { version = "0.52", default-features = false }
windows-core = { version = "0.59", default-features = false }
windows-targets = { version = "0.53", default-features = false }

[build-dependencies]
cfg_aliases = { version = "0.2", default-features = false }
Expand All @@ -39,7 +39,7 @@ mozbuild = { version = "0.1", default-features = false, optional = true }
bindgen = { version = "0.69", default-features = false, features = ["runtime"] }

[target.'cfg(windows)'.build-dependencies]
windows-bindgen = { version = "0.58", default-features = false, features = ["metadata"] }
windows-bindgen = { version = "0.59", default-features = false }

[features]
gecko = ["dep:mozbuild"]
Expand All @@ -48,3 +48,6 @@ gecko = ["dep:mozbuild"]
cargo = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }

[patch.crates-io]
libloading = { git = "https://github.com/erichdongubler-contrib/rust_libloading", branch = "windows-0.59" }
10 changes: 4 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ fn bindgen() {
windows_bindgen::bindgen([
"--out",
out_path.to_str().unwrap(),
"--config",
"flatten",
"no-inner-attributes",
"minimal",
"--flat",
"--no-comment",
"--no-allow",
"--filter",
"Windows.Win32.Foundation.NO_ERROR",
"Windows.Win32.Networking.WinSock.AF_INET",
Expand All @@ -99,8 +98,7 @@ fn bindgen() {
"Windows.Win32.NetworkManagement.IpHelper.if_indextoname",
"Windows.Win32.NetworkManagement.IpHelper.MIB_IPINTERFACE_ROW",
"Windows.Win32.NetworkManagement.Ndis.IF_MAX_STRING_SIZE",
])
.expect("Couldn't write bindings!");
]);
println!("cargo:rustc-env=BINDINGS={}", out_path.display());
}

Expand Down
7 changes: 3 additions & 4 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ use crate::default_err;
#[allow(
non_camel_case_types,
non_snake_case,
clippy::semicolon_if_nothing_returned,
clippy::missing_transmute_annotations,
clippy::upper_case_acronyms,
clippy::struct_field_names
clippy::all,
clippy::nursery,
clippy::pedantic
)]
mod bindings {
include!(env!("BINDINGS"));
Expand Down

0 comments on commit 8b708e3

Please sign in to comment.