# Cross-compiling Arti (Linux\>Windows)

**URL:** https://forum.torproject.org/t/cross-compiling-arti-linux-windows/4078
**Category:** Core Tor
**Created:** [July 25, 2022, 11:02am UTC](https://forum.torproject.org/t/cross-compiling-arti-linux-windows/4078 "2022-07-25T11:02:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![meonriox](https://forum.torproject.org/letter_avatar_proxy/v4/letter/m/e79b87/32.png) [@meonriox](https://forum.torproject.org/u/meonriox)
#### Post date: [July 25, 2022, 11:02am UTC](https://forum.torproject.org/t/cross-compiling-arti-linux-windows/4078/1 "2022-07-25T11:02:20Z")

</div>

Hello. I am trying to build arti.exe on debian 11 i386 for windows using rust. I have installed mingw compiler on the system (it is used as a linker) and specified commands like:

```auto
rustup target add i686-pc-windows-gnu
cargo build --release --target i686-pc-windows-gnu

```

The compilation happens, a lot of packages are built. An error appears on the package ring. This is not rust but a native C application and it needs gcc (in this case gcc refers to mingw). Unfortunately the cross compilation environment is not taken into account when building the ring component. That is, it tries (with mingw) to build from i686-unknown-linux-gnu for i686-unknown-linux-gnu instead of from i686-unknown-linux-gnu for i686-pc-windows-gnu.  
Could you please fix this bug? (in the ring config) or give me a workaround.

Of course I could compile arti in windows environment (I have to install gcc-mingw there too). But I don’t have Win7+. And in wine rustup doesn’t work because of [this error](https://github.com/tokio-rs/mio/issues/1444).
