<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/os/windows, branch 1.77.2</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.77.2</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.77.2'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-04-08T23:09:23+00:00</updated>
<entry>
<title>Document Windows argument splitting</title>
<updated>2024-04-08T23:09:23+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2024-01-31T11:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ad13f26685d218f947263785470ff17ce1853b0a'/>
<id>urn:sha1:ad13f26685d218f947263785470ff17ce1853b0a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Update documentation of seek_write on Windows</title>
<updated>2024-01-28T19:24:27+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2024-01-28T19:24:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b85b2a783b813def53b2a7f0c9b53fed119e2338'/>
<id>urn:sha1:b85b2a783b813def53b2a7f0c9b53fed119e2338</id>
<content type='text'>
Currently the documentation of `FileExt::seek_write` on Windows
indicates that writes beyond the end of the file leave intermediate
bytes uninitialized. This commentary dates back to the original
inclusion of these functions in #35704 (wow blast from the past!). At
the time the functionality here was implemented using `WriteFile`, but
nowadays the `NtWriteFile` method is used instead. The documentation for
`NtWriteFile` explicitly states:

&gt; If Length and ByteOffset specify a write operation past the current
&gt; end-of-file mark, NtWriteFile automatically extends the file and updates
&gt; the end-of-file mark; any bytes that are not explicitly written between
&gt; such old and new end-of-file marks are defined to be zero.

This commentary has had a downstream impact in the `system-interface`
crate where it tries to handle this by explicitly writing zeros, but I
don't believe that's necessary any more. I'm sending a PR upstream here
to avoid future confusion and codify that zeros are written in the
intermediate bytes matching what Windows currently provides.
</content>
</entry>
<entry>
<title>Fix tracking issue of Windows ExitCodeExt</title>
<updated>2023-11-23T19:16:10+00:00</updated>
<author>
<name>David Tolnay</name>
<email>dtolnay@gmail.com</email>
</author>
<published>2023-11-23T19:16:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=52c07b9564654603af8972e93682fe887126d090'/>
<id>urn:sha1:52c07b9564654603af8972e93682fe887126d090</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unnecessary_mut_passed</title>
<updated>2023-11-22T13:00:28+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2023-11-21T23:06:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bfbeb3ebd977997233f93c5cce11bbdfdd34237d'/>
<id>urn:sha1:bfbeb3ebd977997233f93c5cce11bbdfdd34237d</id>
<content type='text'>
This is where our Windows API bindings previously (and incorrectly) used `*mut` instead of `*const` pointers. Now that the bindings have been corrected, the mutable references (which auto-convert to `*mut`) are unnecessary and we can use shared references.
</content>
</entry>
<entry>
<title>useless_conversion</title>
<updated>2023-11-22T13:00:28+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2023-11-21T23:02:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6c22e57c39b8fd8304ad317b42ddb7561000215f'/>
<id>urn:sha1:6c22e57c39b8fd8304ad317b42ddb7561000215f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Substitute version placeholders</title>
<updated>2023-11-16T00:40:51+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2023-11-12T16:45:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=efe54e24aafc413f3f6251ceeace57b810e4df29'/>
<id>urn:sha1:efe54e24aafc413f3f6251ceeace57b810e4df29</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stabilize `file_set_times`</title>
<updated>2023-10-31T06:34:02+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2023-10-31T02:26:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bcfc48db762ca4ce8758b5c8c4c52ee6e5ae5764'/>
<id>urn:sha1:bcfc48db762ca4ce8758b5c8c4c52ee6e5ae5764</id>
<content type='text'>
Approved via FCP in https://github.com/rust-lang/rust/issues/98245 .
</content>
</entry>
<entry>
<title>Bump version placeholders</title>
<updated>2023-10-04T00:26:36+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2023-10-02T23:12:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=787d32324c1615b877811501cda564b9af335e65'/>
<id>urn:sha1:787d32324c1615b877811501cda564b9af335e65</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #114882 - ChrisDenton:riddle-me, r=dtolnay</title>
<updated>2023-09-28T13:35:36+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-09-28T13:35:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dd91aba2fdd8e3b6d9248a401bd6eb2f8d445cdf'/>
<id>urn:sha1:dd91aba2fdd8e3b6d9248a401bd6eb2f8d445cdf</id>
<content type='text'>
Update windows ffi bindings

Bump `windows-bindgen` to version 0.51.1. This brings with it some changes to the generated FFI bindings, but little that affects the code.

One change that does have more of an impact is `SOCKET` being `usize` instead of either `u64` or `u32` (as is used in std's public `SOCKET` type). However, it's now easy enough to abstract over that difference.

Finally I added a few new bindings that are likely to be used in pending PRs, mostly to make sure they're ok with the new metadata.

r? libs
</content>
</entry>
<entry>
<title>Auto merge of #98704 - vthib:impl-from-raw-for-childstd-structs, r=dtolnay</title>
<updated>2023-09-28T09:59:03+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-09-28T09:59:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e2d6aa77ed3fdb2ec6ceb4ee05429457768a4c0f'/>
<id>urn:sha1:e2d6aa77ed3fdb2ec6ceb4ee05429457768a4c0f</id>
<content type='text'>
Implement From&lt;OwnedFd/Handle&gt; for ChildStdin/out/err object

## Summary

Comments in `library/std/src/process.rs` ( https://github.com/rust-lang/rust/commit/ab08639e5950f5c8a42a2870c9636181308c3686 ) indicates that `ChildStdin`, `ChildStdout`, `ChildStderr` implements some traits that are not actually implemented: `FromRawFd`, `FromRawHandle`, and the `From&lt;OwnedFd&gt;/From&lt;OwnedHandle&gt;` from the io_safety feature.

In this PR I implement `FromRawHandle` and `FromRawFd` for those 3 objects.

## Usecase

I have a usecase where those implementations are basically needed. I want to customize
in the `Command::spawn` API how the pipes for the parent/child communications are created (mainly to strengthen the security attributes on them). I can properly setup the pipes,
and the "child" handles can be provided to `Child::spawn` easily using `Stdio::from_raw_handle`. However, there is no way to generate the `ChildStd*` objects from the raw handle of the created name pipe, which would be very useful to still expose the same API
than in other OS (basically a `spawn(...) -&gt; (Child, ChildStdin, ChildStdout, ChildSterr)`, where on windows this is customized), and to for example use `tokio::ChildStdin::from_std` afterwards.

## Questions

* Are those impls OK to add? I have searched to see if those impls were missing on purpose, or if it was just never implemented because never needed. I haven't found any indication on why they couldn't be added, although the user clearly has to be very careful that the handle provided makes sense (i think, mainly that it is in overlapped mode for windows).
* If this change is ok, adding the impls for the io_safety feature would probably be best, or should it be done in another PR?
* I just copy-pasted the `#[stable(...)]` attributes, but the `since` value has to be updated, I'm not sure to which value.
</content>
</entry>
</feed>
