<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-07-17T01:58:29+00:00</updated>
<entry>
<title>Rollup merge of #143592 - ChrisDenton:uwp-link, r=Mark-Simulacrum</title>
<updated>2025-07-17T01:58:29+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2025-07-17T01:58:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2f879530d223e8b10636cb1d80d08cf5c74606e8'/>
<id>urn:sha1:2f879530d223e8b10636cb1d80d08cf5c74606e8</id>
<content type='text'>
UWP: link ntdll functions using raw-dylib

Lazy loading isn't necessary so there's no need for the added complexity and overhead. However, it may be that people using UWP rust libraries don't have the necessary import libraries linked by Visual Studio so this uses raw-dylib, which allows linking to DLL functions without having an import library. This is a somewhat temporary situation as raw-dylib is intended to eventually be the default for all imports. When that happens, this special case can be removed.

Closes rust-lang/rust#143530
</content>
</entry>
<entry>
<title>Rollup merge of #143910 - ChrisDenton:no-symbolization, r=tgross35</title>
<updated>2025-07-15T10:52:42+00:00</updated>
<author>
<name>Samuel Tardieu</name>
<email>sam@rfc1149.net</email>
</author>
<published>2025-07-15T10:52:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2e37e241792643abb837dbcaca454b0e02fc5002'/>
<id>urn:sha1:2e37e241792643abb837dbcaca454b0e02fc5002</id>
<content type='text'>
Add experimental `backtrace-trace-only` std feature

This experimentally allows building std with backtrace but without symbolisation. It does not affect stable and requires build-std to use. This doesn't change the backtrace crate itself so relies on the optimizer to remove the unused parts.

Example usage:

```toml
# .cargo/config.toml
[unstable]
build-std = ["core", "alloc", "panic_unwind", "std"]
build-std-features = ["backtrace", "backtrace-trace-only", "panic-unwind"]
```

```toml
# Cargo.toml
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
```

Ideally we should split the backtrace feature into `backtrace-trace` and `backtrace-symbolize` (with the latter dependent on the former) because Cargo features tend to work better when they're positive rather than negative. But I'm keen for this experiment not to break existing users.

cc ``@joshtriplett``
</content>
</entry>
<entry>
<title>Rollup merge of #143710 - joshtriplett:random-updates, r=joshtriplett</title>
<updated>2025-07-14T16:05:44+00:00</updated>
<author>
<name>Samuel Tardieu</name>
<email>sam@rfc1149.net</email>
</author>
<published>2025-07-14T16:05:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=30b46e3f8cb0116d5ca6a183b370ad3935e34dc8'/>
<id>urn:sha1:30b46e3f8cb0116d5ca6a183b370ad3935e34dc8</id>
<content type='text'>
Updates to random number generation APIs

Updates based on discussions about random number generation.

- Add comment on `RandomSource::fill_bytes` about multiple calls, to allow
  efficient implementations for random sources that generate a word at a time.

- Drop the `Random` trait in favor of `Distribution&lt;T&gt;`, which will let people
  make calls like random(1..=6), and which allows for future expansion to
  non-uniform distributions, as well as floating-point. (For now, this is only
  implemented for `RangeFull`, to get the interface in place. Subsequent PRs
  will implement it for other range types.)
</content>
</entry>
<entry>
<title>Rollup merge of #141809 - ChrisDenton:no-cleaup, r=jhpratt</title>
<updated>2025-07-14T16:05:43+00:00</updated>
<author>
<name>Samuel Tardieu</name>
<email>sam@rfc1149.net</email>
</author>
<published>2025-07-14T16:05:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74b5ac5c15827b9d4e07a5d3f79b6ef787e50bfb'/>
<id>urn:sha1:74b5ac5c15827b9d4e07a5d3f79b6ef787e50bfb</id>
<content type='text'>
Don't call WSACleanup on process exit

This isn't necessary as cleanup will happen when the process exits regardless.

fixes rust-lang/rust#141799
</content>
</entry>
<entry>
<title>Don't call WSACleanup on process exit</title>
<updated>2025-07-14T14:27:49+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2025-05-31T10:39:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c8fb37a521b1f8cf13ddf1ffb81b0a30b05e0706'/>
<id>urn:sha1:c8fb37a521b1f8cf13ddf1ffb81b0a30b05e0706</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add experimental backtrace-trace-only std feature</title>
<updated>2025-07-14T11:52:17+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2025-07-13T22:53:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9fd3886838afd28ee3834d0e7162fd6ab5adc944'/>
<id>urn:sha1:9fd3886838afd28ee3834d0e7162fd6ab5adc944</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #143881 - orlp:once-state-repr, r=tgross35</title>
<updated>2025-07-14T09:04:55+00:00</updated>
<author>
<name>Jakub Beránek</name>
<email>berykubik@gmail.com</email>
</author>
<published>2025-07-14T09:04:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=70301da7c7ea0678b72cd25ed869b023547e15cb'/>
<id>urn:sha1:70301da7c7ea0678b72cd25ed869b023547e15cb</id>
<content type='text'>
Use zero for initialized Once state

By re-labeling which integer represents which internal state for `Once` we can ensure that the initialized state is the all-zero state. This is beneficial because some CPU architectures (such as Arm) have specialized instructions to specifically branch on non-zero, and checking for the initialized state is by far the most important operation.

As an example, take this:

```rust
use std::sync::atomic::{AtomicU32, Ordering};

const INIT: u32 = 3;

#[inline(never)]
#[cold]
pub fn slow(state: &amp;AtomicU32) {
    state.store(INIT, Ordering::Release);
}

pub fn ensure_init(state: &amp;AtomicU32) {
    if state.load(Ordering::Acquire) != INIT {
        slow(state)
    }
}
```

If `INIT` is 3 (as is currently the state for `Once`), we see the following assembly on `aarch64-apple-darwin`:

```asm
example::ensure_init::h332061368366e313:
        ldapr   w8, [x0]
        cmp     w8, #3
        b.ne    LBB1_2
        ret
LBB1_2:
        b       example::slow::ha042bd6a4f33724e
```

By changing the `INIT` state to zero we get the following:

```asm
example::ensure_init::h332061368366e313:
        ldapr   w8, [x0]
        cbnz    w8, LBB1_2
        ret
LBB1_2:
        b       example::slow::ha042bd6a4f33724e
```

So this PR saves 1 instruction every time a `LazyLock` gets accessed on platforms such as these.
</content>
</entry>
<entry>
<title>Add comment why we use zero for COMPLETE</title>
<updated>2025-07-13T10:37:34+00:00</updated>
<author>
<name>Orson Peters</name>
<email>orsonpeters@gmail.com</email>
</author>
<published>2025-07-13T10:37:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f041962694875c0f0a33f8a5e27fd00597042169'/>
<id>urn:sha1:f041962694875c0f0a33f8a5e27fd00597042169</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use zero for initialized Once state</title>
<updated>2025-07-13T10:16:40+00:00</updated>
<author>
<name>Orson Peters</name>
<email>orsonpeters@gmail.com</email>
</author>
<published>2025-07-13T10:16:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a2d41393365df0c0c9f728de7f79b8f0d4e14ef2'/>
<id>urn:sha1:a2d41393365df0c0c9f728de7f79b8f0d4e14ef2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Attempt to fix up SGX for random API updates</title>
<updated>2025-07-13T09:54:27+00:00</updated>
<author>
<name>Josh Triplett</name>
<email>josh@joshtriplett.org</email>
</author>
<published>2025-07-13T09:54:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=377aa764aacabbf32c1d0e91312071660b14c919'/>
<id>urn:sha1:377aa764aacabbf32c1d0e91312071660b14c919</id>
<content type='text'>
</content>
</entry>
</feed>
