Hello guys, I am sure you might have already heard this question a lot of time before. I tried to look it up in the forum but couldn't find anything so if you could help me out that would be really appreciated.
I recently tried installing rust on my Mac m1. After i finished the installation, i ran the command rustc --version to look up the version and it showed the version installed. If i restart my terminal and run it again it says "zsh: command not found: rustc". From looking around online it seemed like an environment variable issue, but i have tried almost everything people suggested on places like stack overflow and github and nothing seems to work so far. Ever after placing the path in the nano file it still doesn't pick it up. If anyone can help me out with this or if anyone had a similar problem and figured out a way to fix it please let me know. Would be really helpful.
Edit:
Although whenever i do run source $HOME/.cargo/env before running rustc --version (even after restarting terminal) it always runs succesfully.