🦀 Build tool
Keep your Mac awake during Rust and Cargo builds
A from-scratch cargo build --release compiles every crate in the dependency tree and can run for many minutes. AwakeMate keeps your Mac awake until Cargo finishes.
Free 14-day trial · one-time $39.99 · no telemetry · macOS 13+
When your Mac sleeps mid-Rust (Cargo)
Rust's release optimiser is slow on purpose, and a cold build compiles the whole dependency graph one crate at a time - heavy, sustained CPU with no keyboard or trackpad activity. macOS sleeps mid-compile, Cargo's job is interrupted, and although it resumes where it can, an interrupted link or proc-macro step can leave you re-running the slowest part of the build.
AwakeMate keeps it awake while Rust (Cargo) runs
AwakeMate recognises Cargo by its process name, cargo, which covers cargo build, cargo test and cargo run. The underlying rustc invocations sit under it, so a single match keeps the Mac awake for the whole build.
Detected process: cargo
Tip: turn on "Sleep when tools go idle"
Cargo builds are a long, steady CPU climb, then silence. With idle-sleep on, AwakeMate keeps the Mac awake while cargo is compiling and lets it sleep the moment the release build or test run completes. Perfect for the big release compile you start and step away from.
Get the most out of it
- Running
cargo watchfor continuous rebuilds? Idle-sleep keeps the Mac awake during each rebuild and lets it rest while you edit. - Long release builds on battery stay safe - AwakeMate blocks idle sleep without overriding your energy settings, so thermal throttling still applies.
More questions about Rust (Cargo)tap to expand
Does one cargo entry cover rustc too?
Yes. rustc runs as a child of cargo during a build, so matching cargo keeps the Mac awake for the entire compile.
What about cargo test and cargo run?
Both run under the cargo process name and are recognised the same way as a build.
Will it keep my Mac awake between builds?
No. With idle-sleep on, the hold is released as soon as Cargo stops using the CPU, so editing between builds won't block sleep.
What's the best way to keep my Mac awake during a long cargo build?
Add the cargo process to AwakeMate and it keeps the Mac awake automatically whenever cargo build, cargo test or a release compile is running. With idle-sleep on it powers through the slow optimiser pass, then lets the Mac sleep the moment Cargo finishes - no need to wrap the command yourself.
How is this better than caffeinate -i cargo build --release?
caffeinate -i cargo build --release works, but only for that one invocation and only if you remember it every time. It is all-or-nothing, holding the Mac awake for everything until the command exits, with no idle-aware sleep or status surface. AwakeMate uses the same IOKit assertion automatically per build tool and lets the Mac sleep as soon as the build is done.
Can I leave a big release build running overnight on battery?
Yes, and AwakeMate has a low-battery cutoff you can set so it stops holding the Mac awake once the charge falls below your threshold, letting it sleep to protect the battery. It never changes your saved energy settings, so the usual throttling still applies during the compile.
Will it keep my Mac awake for Rust (Cargo) with the lid closed, even on battery?
Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate then keeps the Mac awake with the lid shut while Rust (Cargo) runs, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm). It works on battery too, but real work drains it faster, so keep it on power for long runs. See how it works.