fermyon / feedback

Centralized repository for Fermyon Cloud feedback and bug reports
3 stars 1 forks source link

hello_rust example fails for me #13

Closed bluesunrise closed 1 year ago

bluesunrise commented 1 year ago

I was following the tutorial here:

(https://developer.fermyon.com/cloud/develop)

After creating the hello_rust example, when I run:

spin build

I see lots of compile errors like:

error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope
    --> /Users/dtaylor/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-1.4.0/src/bytes_mut.rs:1242:13
     |
1242 |             Ok(())
     |             ^^ not found in this scope

Frequency of the bug Please check one:

Set-up information Please share the version of Spin used when the bug occurred. You can find the version of Spin by running spin -V.

 spin -V
spin 0.7.1 (6cf7447 2022-12-19)
cargo -V
cargo 1.67.1 (8ecd4f20a 2023-01-10)
rustc -V
rustc 1.67.1 (d5a82bbd2 2023-02-07)
Mac OS X 12.6.3

To Reproduce Steps to reproduce the behavior:

  1. Follow the tutorial (https://developer.fermyon.com/cloud/develop)
  2. spin new
  3. cd hello_rust
  4. spin build

Expected behavior I expected not to get syntax errors when building

Screenshots If applicable, add screenshots to help explain your problem. (Remember to remove any personally-identifiable information.)

Additional context Add any other context about the problem here.

itowlson commented 1 year ago

Thanks for reporting this and sorry you've not had a smooth ride. Could you double check that you have the Rust wasm32-wasi target installed please?

$ rustup target list --installed
wasm32-wasi                      # should have this
x86_64-unknown-linux-gnu         # yours will be Mac of course!

If not, could you try installing it via rustup target add wasm32-wasi please, and let us know if that helps? Thanks!

If that was the problem, our apologies. We're reworking that page at the moment to hopefully call out these dependencies clearly!

bluesunrise commented 1 year ago

Think I found the problem, I needed another step:

rustup target add wasm32-wasi

That seemed to fix it

You may want to add that command to the Getting Started doc here: (https://developer.fermyon.com/cloud/develop)

The Spin Getting Started doc has it here:

https://developer.fermyon.com/spin/quickstart

Feel free to close the issue

bluesunrise commented 1 year ago

Hi @itowlson --- just saw your comment: right on, thank you!

itowlson commented 1 year ago

Great, glad to hear that's resolved!