I have written a program in Rust on my M1 Mac, and compiled it to a Unix executable just fine. Now I want to compile it to a Windows executable as well. I first tried

```
$ cargo target add x86_64-pc-windows-gnu
$ cargo build --release --target=x86_64-pc-windows-gnu

```

I got the error message:

> 
> error: linker `x86_64-w64-mingw32-gcc` not found
> 
> 
> 

so I tried

```
$ brew install mingw-w64

```

according to [this](https://users.rust-lang.org/t/cross-compile-macos-and-ms-windows/38323/2), and got the error:

> 
> Error: mingw-w64: no bottle available!
> 
> 
> 

I looked on [formulae.brew.sh](https://formulae.brew.sh/formula/mingw-w64) and it seems that `mingw-w64` isn't supported for M1, only Intel.

How can I compile an exe from rust using my M1 Mac?