Skip to content
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

documentation installation does not work #754

Closed
grishasobol opened this issue Aug 31, 2022 · 4 comments · Fixed by #771
Closed

documentation installation does not work #754

grishasobol opened this issue Aug 31, 2022 · 4 comments · Fixed by #771

Comments

@grishasobol
Copy link

When I try to do this

Install the CLI tool via `cargo`:
```shell
$ cargo install --git https://github.com/bytecodealliance/wasm-tools
```
Convert some arbitrary input into a valid Wasm module:

then this message is appear:

$ cargo install --git https://github.com/bytecodealliance/wasm-tools wasm-smith
    Updating git repository `https://github.com/bytecodealliance/wasm-tools`
error: there is nothing to install in `wasm-smith v0.11.4 (https://github.com/bytecodealliance/wasm-tools#e71ba20d)`, because it has no binaries
`cargo install` is only for installing programs, and can't be used with libraries.
To use a library crate, add it as a dependency in a Cargo project instead.
@alexcrichton
Copy link
Member

Ah those instructions need to be updated, they should recommend cargo install wasm-tools and usage is wasm-tools smith ....

Would you be up for sending a PR to udpate the instructions?

@Lost-Temple
Copy link

when I excuted cargo install wasm-tools , I got the error below:

error[E0658]: use of unstable library feature 'array_from_fn'
--> /Users/xxx/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/arbitrary-1.1.6/src/lib.rs:655:36
|
655 | crate::size_hint::and_all(&array::from_fn::<_, N, >(|| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #89379 rust-lang/rust#89379 for more information

error[E0747]: constant provided when a type was expected
--> /Users/xxx/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/arbitrary-1.1.6/src/lib.rs:655:56
|
655 | crate::size_hint::and_all(&array::from_fn::<_, N, >(|| {
| ^
|
= note: type arguments must be provided before constant arguments
= help: reorder the arguments: types, then consts: <F, T, N>

Some errors have detailed explanations: E0658, E0747.
For more information about an error, try rustc --explain E0658.
error: could not compile arbitrary due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile wasm-tools v1.0.10, intermediate artifacts can be found at /var/folders/c4/yxvm0t0d3p5fkhtdz0p0_rf80000gn/T/cargo-installkFAaZM

Caused by:
build failed

@peterhuene
Copy link
Member

peterhuene commented Sep 21, 2022

Hi @Lost-Temple. array::from_fn was stabilized in 1.63.0, released a few weeks back.

My guess is you need to update your Rust toolchain to the latest version to install wasm-tools with the latest dependencies or, alternatively, install with the --locked option to use force cargo to use the versions from the lock file.

alexcrichton added a commit to alexcrichton/wasm-tools that referenced this issue Sep 21, 2022
Modernize a few instructions and update references for installation/CLI
where appropriate

Closes bytecodealliance#754
fitzgen pushed a commit that referenced this issue Sep 21, 2022
* Update the `wasm-smith` README a bit

Modernize a few instructions and update references for installation/CLI
where appropriate

Closes #754

* Update more READMEs

* Remove version numbers, recommend `cargo add` instead
* Update some references to CLI tools
@Lost-Temple
Copy link

thx, it worked.

  1. rustup update stable --no-self-update && rustup default stable
  2. cargo install wasm-tools

thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants