yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications

Home Page:https://yew.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tell newcomers to add `wasm32-unknown-unknown`

ccppoo opened this issue · comments

commented

This is about:

  • A typo
  • Innaccurate/misleading documentation (e.g. technically incorrect advice)
  • Undocumented code
  • Outdated documentation
  • Other

Problem

I had trivials when running examples of this repository

Just got installed rust, and did what example README.md tells me todo

but faced error messages

image

I was so scared but I tried to find out why and found the solution, add wasm32-unknown-unknown.

Thanks to stackoverflow as I always do

stackoverflow : error[E0463]: can't find crate for core while building rust project for wasm32-unknown-unknown

Details about the solution you'd like (Optional)

add doc to install wasm32 dependencies

# thanks to stackoverflow
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown

Additional context (Optional)

Most of newcomers could not guess wasm32-unknown-unknown is something that should or could be installed

literally it says unknown

I searched error messages I saw, suspecting it was all about Windows

some questions and issues of error messages (including blaming Windows )

were quite simliar from what I saw during this process

So it will be very helpful for others and as well as maintainers

Questionaire (Optional)

  • I'd like to write this documentation
  • I'd like to write this documentation but I'm not sure what's needed
  • I don't have time to add this right now, but maybe later
commented

It may be helpful if the examples refer to the Getting Started guide, or the Tutorial.

At the moment, there may be an assumption that newcomers will have read these documents before trying out the examples.

I don't mind either way of mentioning the link of Tutorial / Getting Started Guide or adding a sentence stating that you need wasm32 target added with rustup. @ccppoo Would you like to add a PR to fix the README?