This blog post details the steps to disable XProtect on macOS. XProtect checks for known malicious content whenever:
- An app is first launched.
- An app has been modified in the file system.
- XProtect signatures are updated.
Please do not disable XProtect/Gatekeeper just to speed up Rust binaries or compile times on macOS. This is poor advice, similar to the many forum posts or tutorials that suggest disabling SELinux on Linux to solve minor configuration issues
https://nnethercote.github.io/2025/09/04/faster-rust-builds-on-mac.html
Faster Rust builds on Mac
Did you know that macOS has a secret setting that can make Rust builds faster? It can also make Rust tests faster (sometimes massively so). It probably even has similar effects for other compiled languages such as C, C++, Go, and Swift. It sounds crazy, but read on…








