2

I am trying to follow some instructions to run my Rust code on a GPU. However, I am unable to get it to compile.

Despite me installing Rust nightly, Xargo still claims that Rust nightly is not installed. I tried uninstalling and reinstalling Xargo twice and nothing changed.

xargo rustc --target nvptx64-nvidia-cuda -- --emit=asm

Output:

WARNING: the sysroot can't be built for the Stable channel. Switch to nightly.
   Compiling kernel v0.1.0 (file:///C:/Users/shado/Workspace/kernel)
error[E0463]: can't find crate for `core`
  |
  = note: the `nvptx64-nvidia-cuda` target may not be installed

error: aborting due to previous error

error: Could not compile `kernel`.

To learn more, run the command again with --verbose.
rustc --version

Output:

rustc 1.25.0-nightly (15a1e2844 2018-01-20)
Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366

1 Answers1

2

Turns out all I had to run was rustup default nightly to solve this issue.

  • Interesting, when I set it to default to nightly it doesn't fix it. `❯ rustup default nightly info: using existing install for 'nightly-aarch64-apple-darwin' info: default toolchain set to 'nightly-aarch64-apple-darwin' nightly-aarch64-apple-darwin unchanged - rustc 1.69.0-nightly (d7948c843 2023-01-26) ❯ xargo build ERROR: the sysroot can't be built for the Stable channel. Switch to nightly.` – Mike Nishizawa Jan 31 '23 at 14:36