Skip to content

spin build error with wit-bindgen in hello-rust #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
layeddie opened this issue Nov 28, 2022 · 6 comments
Closed

spin build error with wit-bindgen in hello-rust #922

layeddie opened this issue Nov 28, 2022 · 6 comments
Labels
question Further information is requested

Comments

@layeddie
Copy link

layeddie commented Nov 28, 2022

Got this error when running through the hello-rust example. Running on Mac Monterey.
Rust newbie.... not sure this is the right place to raise this....

❯ spin build
Executing the build command for component hello-rust1: cargo build --target wasm32-wasi --release
   Compiling async-trait v0.1.58
   Compiling wit-bindgen-gen-rust v0.2.0 (https://github.com/bytecodealliance/wit-bindgen?rev=cb871cfa1ee460b51eb1d144b175b9aab9c50aba#cb871cfa)
error: there is no argument named `n`
   --> /Users/elay15/.asdf/installs/rust/1.56.1/git/checkouts/wit-bindgen-f98ccff846621481/cb871cf/crates/gen-rust/src/lib.rs:480:39
    |
480 |                         write!(name, "{n}").unwrap();
    |                                       ^^^

error: there is no argument named `name`
   --> /Users/elay15/.asdf/installs/rust/1.56.1/git/checkouts/wit-bindgen-f98ccff846621481/cb871cf/crates/gen-rust/src/lib.rs:621:46
    |
621 |             self.push_str(&format!("pub enum {name}"));
    |                                              ^^^^^^

error[E0658]: use of unstable library feature 'iter_zip'
 --> /Users/elay15/.asdf/installs/rust/1.56.1/git/checkouts/wit-bindgen-f98ccff846621481/cb871cf/crates/gen-rust/src/lib.rs:4:5
  |
4 | use std::iter::zip;
  |     ^^^^^^^^^^^^^^
  |
  = note: see issue #83574 <https://github.com/rust-lang/rust/issues/83574> for more information

error[E0658]: use of unstable library feature 'iter_zip'
   --> /Users/elay15/.asdf/installs/rust/1.56.1/git/checkouts/wit-bindgen-f98ccff846621481/cb871cf/crates/gen-rust/src/lib.rs:595:13
    |
595 |             zip(self.union_case_names(iface, union), &union.cases)
    |             ^^^
    |
    = note: see issue #83574 <https://github.com/rust-lang/rust/issues/83574> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `wit-bindgen-gen-rust` due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Build command for component hello-rust1 failed with status Exited(101).
14:25:19 ~/projects/fermyon/bartholomew/hello_rust1 main*
@itowlson
Copy link
Collaborator

Could you try updating your Rust to a more recent version please? Not sure exactly what our minimum version is but I don't think we can build with 1.56 any more. rustup update should do the trick; let us know if it still doesn't work with Rust 1.65.

(If you need to stay on 1.56 for other reasons, you might need to use the rustup toolchain feature to switch back and forth, sorry.)

@itowlson
Copy link
Collaborator

Also... since this seems to relate to Spin rather than the Bartholomew CMS, is it okay for us to move it to the Spin repo? (Forgive me if I'm misunderstanding.)

@layeddie
Copy link
Author

layeddie commented Nov 29, 2022 via email

@itowlson itowlson transferred this issue from fermyon/bartholomew Nov 29, 2022
@kate-goldenring kate-goldenring moved this to 🆕 Triage Needed in Spin Triage Nov 30, 2022
@dicej dicej moved this from 🆕 Triage Needed to 📋 Investigating in Spin Triage Nov 30, 2022
@dicej dicej added the question Further information is requested label Nov 30, 2022
@itowlson
Copy link
Collaborator

Hi, is this okay to close?

@layeddie
Copy link
Author

layeddie commented Dec 18, 2022 via email

@itowlson
Copy link
Collaborator

Thanks! Please do reopen if you get round to having another go and still hit it.

Repository owner moved this from 📋 Investigating / Open for Comment to ✅ Done in Spin Triage Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants