Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't find crate for core #2

Open
jxuanli opened this issue Jul 11, 2022 · 3 comments
Open

can't find crate for core #2

jxuanli opened this issue Jul 11, 2022 · 3 comments

Comments

@jxuanli
Copy link

jxuanli commented Jul 11, 2022

error[E0463]: can't find crate for `core`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
cargo build failed

I got this error when running deno task wasmbuild and the command rustup target add wasm32-unknown-unknown didn't work, I am wondering how I should fix this? Thanks!

@dsherret
Copy link
Member

What's the full log? wasmbuild should run rustup target add wasm32-unknown-unknown for you if not installed.

What's the output of: rustup --version and rustc --version?

@jxuanli
Copy link
Author

jxuanli commented Jul 12, 2022

The full log:

>>>deno task wasmbuild
Warning deno task is unstable and may drastically change in the future
Task wasmbuild deno run -A https://deno.land/x/wasmbuild@0.8.2/main.ts
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   C:\TempAccess\rusty_playground\chat\rs_lib\Cargo.toml
workspace: C:\TempAccess\rusty_playground\chat\Cargo.toml
Ensuring wasm32-unknown-unknown target installed...
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
Building rs_lib web assembly...
  cargo build --lib -p rs_lib --target wasm32-unknown-unknown --release
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   C:\TempAccess\rusty_playground\chat\rs_lib\Cargo.toml
workspace: C:\TempAccess\rusty_playground\chat\Cargo.toml
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.40
   Compiling quote v1.0.20
   Compiling log v0.4.17
   Compiling wasm-bindgen-shared v0.2.81
   Compiling syn v1.0.98
   Compiling wasm-bindgen v0.2.81
error[E0463]: can't find crate for `core`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
cargo build failed

rustup:

>>>rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.63.0-nightly (bb8c2f411 2022-06-19)`

rustc:

>>> rustc --version
rustc 1.61.0 (fe5b13d68 2022-05-18)

@dsherret
Copy link
Member

Hmmm, that's strange. I wonder if it has to do with:

info: The currently active `rustc` version is `rustc 1.63.0-nightly (bb8c2f411 2022-06-19)`

Maybe try running:

rustup update
rustup default stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants