Ask coding questions

← Back to all posts
Cannot Cross-Compile Rust

I'm trying to compile to x86_64-pc-windows-gnu, which already shows up in my target list when I enter rustc --print target-list, but when I run cargo build --release --target x86_64-pc-windows-gnu it says "can't find crate for std" and that the "x86_64-pc-windows-gnu target may not be installed". However, I can't install it with rustup because I can't install rustup on replit without uninstalling Rust first, which I can't do because it's a read-only file system. I've tried adding my own .cargo/config file that you can see on the repl and a target/x86_64-pc-windows-gnu directory has been created, but it still gives me the same error. Anyone else had this problem?