rust/src
Jonathan Brouwer f1922ffe3b
Rollup merge of #151004 - apple-sleep-until, r=ChrisDenton
std: implement `sleep_until` on Apple platforms

On Apple platforms, `nanosleep` is internally [implemented](55b54c0a0c/gen/nanosleep.c (L281)) using `mach_wait_until`, a function that waits until a deadline specified in terms of `mach_absolute_time`. Since `mach_wait_until` is [public](f6217f891a/osfmk/mach/mach_time.h (L50-L51))[^1], we can use it to implement `sleep_until` by converting `Instant`s (which are measured against `CLOCK_UPTIME_RAW`, which is equivalent to `mach_absolute_time`) into `mach_absolute_time` values.

Related tracking issue: https://github.com/rust-lang/rust/issues/113752

[^1]: It's badly documented, but it's defined in the same header as `mach_absolute_time`, which  `std` used to use for `Instant` before rust-lang/rust#116238.
2026-01-19 20:53:21 +01:00
..
bootstrap Rollup merge of #151092 - generate-macro-expansion-compiler-crates-docs, r=jieyouxu 2026-01-17 11:47:18 +11:00
build_helper Avoid serde dependency in build_helper when not necessary 2026-01-14 13:21:16 +00:00
ci Rollup merge of #151117 - reduce_deps, r=Kobzol 2026-01-14 22:30:00 +01:00
doc Auto merge of #151228 - cyrgani:less-feature, r=jhpratt 2026-01-17 06:27:42 +00:00
etc fixup debugger files wrt to MaybeDangling 2025-12-26 22:02:17 +01:00
gcc@0081ca6631 Update GCC submodule 2025-11-26 20:11:43 +01:00
librustdoc Auto merge of #151232 - fmease:rustdoc-dont-eval-assoc-consts, r=yotamofek 2026-01-17 16:15:18 +00:00
llvm-project@00d23d10dc Update LLVM submodule 2025-12-20 09:53:08 +08:00
rustc-std-workspace Generalize branch references to HEAD 2025-11-02 11:15:55 +01:00
rustdoc-json-types rustdoc-json: add rlib path to ExternalCrate to enable robust crate resolution 2025-11-21 09:22:59 +00:00
tools Rollup merge of #151004 - apple-sleep-until, r=ChrisDenton 2026-01-19 20:53:21 +01:00
README.md
stage0 Revert bors email to the original homu one 2026-01-11 11:32:32 +01:00
version Bump version to 1.95.0 2026-01-17 10:19:26 -05: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.