Stream: git-wasmtime

Topic: wasmtime / issue #3931 README.md instructions giving me e...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2022 at 21:41):

macovedj opened issue #3931:

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

error: cannot find macro println in this scope
--> src/main.rs:2:5
|
2 | println!("Hello, world!");
| ^^^^^^^

error: requires sized lang_item

error: aborting due to 3 previous errors`

^^^I get this after running rustc main.rs --target wasm32-wasi

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2022 at 21:59):

alexcrichton edited issue #3931:

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

error: cannot find macro `println` in this scope
 --> src/main.rs:2:5
  |
2 |     println!("Hello, world!");
  |     ^^^^^^^

error: requires `sized` lang_item

error: aborting due to 3 previous errors

^^^I get this after running rustc main.rs --target wasm32-wasi

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2022 at 21:59):

alexcrichton commented on issue #3931:

Thanks for the report, but as the error is indicating you don't have the wasm32-wasi standard library for Rust installed. As the readme mentions you'll need to execute rustup target add wasm32-wasi first to install that, then you should be good to go.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 15 2022 at 21:59):

alexcrichton closed issue #3931:

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

error: cannot find macro `println` in this scope
 --> src/main.rs:2:5
  |
2 |     println!("Hello, world!");
  |     ^^^^^^^

error: requires `sized` lang_item

error: aborting due to 3 previous errors

^^^I get this after running rustc main.rs --target wasm32-wasi

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2022 at 13:21):

macovedj commented on issue #3931:

@alexcrichton I apologize, I should have mentioned that I've run that command several times. Rerunning it continually yields info: component 'rust-std' for target 'wasm32-wasi' is up to date

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2022 at 14:33):

alexcrichton commented on issue #3931:

Hm you may want to ask in the Rust forums about that since this isn't really relevant to wasmtime itself. It might be the case that the rustc from your PATH isn't a rustup-managed rustc, though. If you have two Rust installations that could happen.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2022 at 23:43):

ukd1 commented on issue #3931:

I'm also getting this, after following the instructions...not really sure what to ask in the Rust forums, as I've added the target it suggests, and it doesn't work still...

 % rustup target add wasm32-wasi
info: component 'rust-std' for target 'wasm32-wasi' is up to date
% cargo build --target wasm32-wasi
   Compiling hello-wasm v0.1.0 (/Users/russ/Sites/rc/rust/wasm/hello-wasm)
error[E0463]: can't find crate for `std`
  |
  = note: the `wasm32-wasi` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-wasi`

error: cannot find macro `println` in this scope
 --> src/main.rs:2:5
  |
2 |     println!("Hello, world!");
  |     ^^^^^^^

error: requires `sized` lang_item

For more information about this error, try `rustc --explain E0463`.
error: could not compile `hello-wasm` due to 3 previous errors

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2022 at 23:43):

ukd1 edited a comment on issue #3931:

I'm also getting this, after following the instructions...not really sure what to ask in the Rust forums, as I've added the target it suggests, and it doesn't work still...

 % rustup target add wasm32-wasi
info: component 'rust-std' for target 'wasm32-wasi' is up to date
 % cargo build --target wasm32-wasi
   Compiling hello-wasm v0.1.0 (/Users/russ/Sites/rc/rust/wasm/hello-wasm)
error[E0463]: can't find crate for `std`
  |
  = note: the `wasm32-wasi` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-wasi`

error: cannot find macro `println` in this scope
 --> src/main.rs:2:5
  |
2 |     println!("Hello, world!");
  |     ^^^^^^^

error: requires `sized` lang_item

For more information about this error, try `rustc --explain E0463`.
error: could not compile `hello-wasm` due to 3 previous errors

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2022 at 23:45):

sunfishcode commented on issue #3931:

If you run rustup show, what does it say the default toolchain is?


Last updated: Dec 23 2024 at 12:05 UTC