rust/src
bors 7e7483d26e Auto merge of #110152 - ChrisDenton:windows-sys, r=thomcc
Start using `windows sys` for Windows FFI bindings in std

Switch to using windows-sys for FFI. In order to avoid some currently contentious issues, this uses windows-bindgen to generate a smaller set of bindings instead of using the full crate.

Unlike the windows-sys crate, the generated bindings uses `*mut c_void` for handle types instead of `isize`. This to sidestep opsem concerns about mixing pointer types and integers between languages. Note that `SOCKET` remains defined as an integer but instead of being a usize, it's changed to fit the [standard library definition](a41fc00eaf/library/std/src/os/windows/raw.rs (L12-L16)):

```rust
#[cfg(target_pointer_width = "32")]
pub type SOCKET = u32;
#[cfg(target_pointer_width = "64")]
pub type SOCKET = u64;
```

The generated bindings also customizes the `#[link]` imports. I hope to switch to using raw-dylib but I don't want to tie that too closely with the switch to windows-sys.

---

Changes outside of the bindings are, for the most part, fairly minimal (e.g. some differences in `*mut` vs. `*const` or a few types differ). One issue is that our own bindings sometimes mix in higher level types, like `BorrowedHandle`. This is pretty adhoc though.
2023-05-09 05:20:41 +00:00
..
bootstrap Auto merge of #110152 - ChrisDenton:windows-sys, r=thomcc 2023-05-09 05:20:41 +00:00
ci Auto merge of #111224 - jyn514:default-tidy, r=pietroalbini 2023-05-07 17:17:58 +00:00
doc Rollup merge of #111331 - taiki-e:s390x-asm-cc, r=Amanieu 2023-05-08 19:41:50 +09:00
etc Fix unavailable url 2023-04-28 09:54:35 +08:00
librustdoc Rollup merge of #109410 - fmease:iat-alias-kind-inherent, r=compiler-errors 2023-05-08 09:30:21 -07:00
llvm-project@ea6fa9c2d4 Update to LLVM 16.0.2 2023-04-19 12:33:37 +02:00
rustdoc-json-types IAT: Rustdoc integration 2023-05-04 16:59:11 +02:00
tools Auto merge of #110152 - ChrisDenton:windows-sys, r=thomcc 2023-05-09 05:20:41 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json bump stage0 2023-04-28 08:47:55 -07:00
version bump to rust 1.71.0 2023-04-15 12:29:51 +02:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.