bytecodealliance/cargo-wasi

cargo install cargo-wasi build failure

pawel-kedzior-sw opened this issue · 6 comments

Hi, I am getting a build failure on Windows:

C:\Users\mylogin>cargo install cargo-wasi
   ...
   Compiling toml v0.5.5
   Compiling cookie_store v0.7.0
   Compiling reqwest v0.9.24
   Compiling cargo-wasi v0.1.18
error[E0433]: failed to resolve: use of undeclared type or module `cargo_wasi_src`
  --> C:\Users\mylogin\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-wasi-0.1.18\src\main.rs:43:32
   |
43 |         fn cargo_wasi_main() { cargo_wasi_src::main() }
   |                                ^^^^^^^^^^^^^^ use of undeclared type or module `cargo_wasi_src`

error: aborting due to previous error

I am trying to follow this instruction:
https://github.com/bytecodealliance/wasmtime-demos/tree/master/dotnet

The only preceding step was to install Rust from: https://win.rustup.rs/

Am I missing something or is there a problem in cargo-wasi?

I retried this on a clean machine and it went through without problems.
I am not sure what is the root-cause on my primary machine, but I am okay to close this issue.

Humph. FWIW, I know this issue is closed, but I just hit the same problem. Literally, the exact same error message as above, on Windows 10. I'm setting up a new machine. I installed rust, and then tried cargo install cargo-wasi.

cargo --version shows:

cargo 1.40.0 (bc8e4c8be 2019-11-22)

The same procedure worked fine under Linux (Windows WSL 1).

Anyway, there's probably something weird going on here.

Hm I'm publishing a new release just in case, but @ericsink can you gist what rustc -vV prints as well? I'm curious what host platform was failing.

Not sure if pasting into a comment complies with your use of "gist" as a verb :-), but:

rustc 1.40.0 (73528e339 2019-12-16)
binary: rustc
commit-hash: 73528e339aae0f17a15ffa49a8ac608f50c6cf14
commit-date: 2019-12-16
host: i686-pc-windows-msvc
release: 1.40.0
LLVM version: 9.0

Ok thanks for the extra info! I think I've fiddled with this a bit and it should work now, sorry for the hiccup!

It works! :-)