I am using rustc
and cargo
on my 64-bit Windows machine to compile a 32-bit application. This work fine when using the stable toolchain, but when I try to use the beta toolchain it fails.
The beta toolchain was successfully installed with rustup install beta
. In the project folder there is a .cargo/config
file containing the following lines:
[build]
target = "i686-pc-windows-msvc"
[target.i686-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]
When running cargo +beta build
the following error occurs:
error[E0463]: can't find crate for `core`
|
= note: the `i686-pc-windows-msvc` target may not be installed
I have tried running rustup target add i686-pc-windows-msvc
to fix the issue but it didn't help; rustup target list
even displays it as "installed". Possibly this command only adds the target for stable, and I couldn't find out how to specify the beta toolchain.
How can I add another (non-default) target for the beta toolchain?