Verification
Problem
Running the installation script from the rust-lang.org install page on macOS adds . "$HOME/.cargo/env" to ~/.profile rather than ~/.zprofile where it needs to be to work.
Steps
- Run
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Restart Terminal, without manually sourcing the
~/.profile file.
- Rust will not run until
~/.profile is manually sourced or . "$HOME/.cargo/env" is moved to ~/.zprofile.
Possible Solution(s)
Have the setup script add . "$HOME/.cargo/env" to ~/.zprofile instead of ~/.profile on macOS specifically.
Notes
No response
Rustup version
rustup 1.29.0 (28d1352db 2026-03-05)
Installed toolchains
stable-aarch64-apple-darwin
OS version
macOS Tahoe version 26.3.1 (a)
Verification
Problem
Running the installation script from the rust-lang.org install page on macOS adds
. "$HOME/.cargo/env"to~/.profilerather than~/.zprofilewhere it needs to be to work.Steps
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh~/.profilefile.~/.profileis manually sourced or. "$HOME/.cargo/env"is moved to~/.zprofile.Possible Solution(s)
Have the setup script add
. "$HOME/.cargo/env"to~/.zprofileinstead of~/.profileon macOS specifically.Notes
No response
Rustup version
rustup 1.29.0 (28d1352db 2026-03-05)Installed toolchains
stable-aarch64-apple-darwinOS version
macOS Tahoe version 26.3.1 (a)