Stream: general

Topic: Hello World Instructions giving error


view this post on Zulip Daniel Macovei (Mar 16 2022 at 13:23):

Hi I'm following these docs and getting an error even though I'm wadding the web assembly build target https://docs.wasmtime.dev/tutorial-create-hello-world.html

view this post on Zulip Daniel Macovei (Mar 16 2022 at 13:24):

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

view this post on Zulip fitzgen (he/him) (Mar 17 2022 at 15:56):

it looks like you need to add the wasm32-wasi target, running the suggested rustup command should do the trick:

rustup target add wasm32-wasi

Last updated: Nov 22 2024 at 17:03 UTC