wasix-org / cargo-wasix

Cargo wrapper for working with Webassembly wasi(x).
Apache License 2.0
52 stars 10 forks source link

`cargo install cargo-wasix` does not install `wasix` toolchain #49

Closed gwpl closed 8 months ago

gwpl commented 8 months ago

Installation instructions on https://wasix.org/docs/language-guide/rust/installation are not helpful, as they do not provide link how to troubleshoot if installation does not work:

$ cargo install cargo-wasix
    Updating crates.io index
     Ignored package `cargo-wasix v0.1.23` is already installed, use --force to override
$ cargo wasix --version
cargo-wasix 0.1.23
$ rustup toolchain list | grep wasix 
$ rustup toolchain list | grep wasix | wc
      0       0       0
$ rustup toolchain install wasix
error: invalid toolchain name: 'wasix'     

I am using Archlinux. Probably adding link on https://wasix.org/docs/language-guide/rust/installation to more detailed explanation or troubleshooting would be helpful.

theduke commented 8 months ago

The toolchain is installed dynamically when you try to build something.

theduke commented 8 months ago

So try cargo new xx; cd xx; cargo wasix build.

gwpl commented 8 months ago

Worked and installed wasix toolchain:

$ rustup toolchain list | grep wasix 
wasix

So we need to somehow capture this in documentation. Let me do fast edit: https://github.com/VariousForks/wasix-docs/pull/1 , so there is something helpful, later will be probably edited by someone with better "technical writing" XP ;).

theduke commented 8 months ago

Thanks, I'll make some additions to the PR.