Skip to content

encounter error while running build script #2

Open
@Taction

Description

@Taction

After run cargo +nightly build --target=wasm32-unknown-unknown --release, I get the following output:

Updating `ustc` index
   Compiling version_check v0.9.3
   Compiling log v0.4.14
   Compiling cfg-if v1.0.0
   Compiling primes v0.3.0
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`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `std`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: build failed

I have run rustup target add wasm32-unknown-unknown but nothing changed.
I am new to rust, does anyone know the reason for this and how to solve it? Any help will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions