wasix-org/cargo-wasix

Issue with downloading pre-built toolchain on Macos when running `cargo wasix` commands

Closed this issue · 3 comments

Info

Platform/OS: Apple Silicon, Macos Sonoma 14.0

Steps

  1. installed cargo-wasix: cargo install cargo-wasix
  2. make new test project: cargo new --bin wasix-test
  3. try to build the project: cargo wasix build

Notes

Hello!
I was looking to try out the cargo-wasix cli since WASIX is exactly what I have been waiting for, but it looks like whenever i go to build/test/run using cargo wasix build or cargo wasix run, i get this error:

❯ cargo wasix build
Finding latest release... (https://api.github.com/repos/wasix-org/rust/releases/latest)...
Could not download pre-built toolchain: Could not download release info

Caused by:
    HTTP status client error (401 Unauthorized) for url (https://api.github.com/repos/wasix-org/rust/releases/latest)
error: Download of pre-built toolchain failed

Caused by:
    Could not download release info

Caused by:
    HTTP status client error (401 Unauthorized) for url (https://api.github.com/repos/wasix-org/rust/releases/latest)

I tried manually linking the toolchain as well, but that wasn't working out so well.
What can I do to work around this issue or help solve it? Thank you for any help in advance.

Looking into it.

I think this usually happens due to rate limiting of the IP.

You can set a GITHUB_TOKEN env var with a token.
This will then be used for the API requests.

We should probably think about a download method that does not involve Github API requests.

Thank you, that seemed to do the trick! I appreciate the help.