The other answer did not work for me, but what did work for me on M1:
brew install llvm
export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config
export LIBCLANG_PATH=$(brew --prefix llvm)/lib
echo 'export LLVM_CONFIG_PATH=$(brew --prefix llvm)/bin/llvm-config' >> ~/.zshrc
echo 'export LIBCLANG_PATH=$(brew --prefix llvm)/lib' >> ~/.zshrc
source ~/.zshrc
cargo clean
and cargo build
afterwards:)