Skip to content

Commit

Permalink
WIP: switch to sys
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Jun 24, 2024
1 parent 725e9ee commit 6354d3b
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 843 deletions.
6 changes: 2 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6324,8 +6324,7 @@ dependencies = [
[[package]]
name = "windows-bindgen"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ccb96113d6277ba543c0f77e1c5494af8094bf9daf9b85acdc3f1b620e7c7b4"
source = "git+https://github.com/microsoft/windows-rs.git#863a7cf1d05096c09f2c7cac13ff9f5c9abec61e"
dependencies = [
"proc-macro2",
"rayon",
Expand All @@ -6347,8 +6346,7 @@ dependencies = [
[[package]]
name = "windows-metadata"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8308d076825b9d9e5abc64f8113e96d02b2aeeba869b20fdd65c7e70cda13dfc"
source = "git+https://github.com/microsoft/windows-rs.git#863a7cf1d05096c09f2c7cac13ff9f5c9abec61e"

[[package]]
name = "windows-sys"
Expand Down
4 changes: 4 additions & 0 deletions library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ std_detect_file_io = ["std_detect/std_detect_file_io"]
std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval"]
std_detect_env_override = ["std_detect/std_detect_env_override"]

# Enable using raw-dylib for Windows imports.
# This will eventually be the default.
windows_raw_dylib = []

[package.metadata.fortanix-sgx]
# Maximum possible number of threads when testing
threads = 125
Expand Down
4 changes: 3 additions & 1 deletion library/std/src/sys/pal/windows/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use crate::os::raw::{c_char, c_long, c_longlong, c_uint, c_ulong, c_ushort, c_vo
use crate::os::windows::io::{AsRawHandle, BorrowedHandle};
use crate::ptr;

mod windows_targets;

mod windows_sys;
pub use windows_sys::*;

Expand Down Expand Up @@ -503,7 +505,7 @@ if #[cfg(not(target_vendor = "uwp"))] {
#[cfg(target_arch = "arm")]
pub enum CONTEXT {}
}}

// WSAStartup is only redefined here so that we can override WSADATA for Arm32
#[link(name = "ws2_32")]
extern "system" {
pub fn WSAStartup(wversionrequested: u16, lpwsadata: *mut WSADATA) -> i32;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/windows/c/bindings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--out windows_sys.rs
--config flatten std
--config flatten sys
--filter
!Windows.Win32.Foundation.INVALID_HANDLE_VALUE
Windows.Wdk.Storage.FileSystem.FILE_COMPLETE_IF_OPLOCKED
Expand Down
Loading

0 comments on commit 6354d3b

Please # to comment.