wasix-org / cargo-wasix

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

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

Closed brendisurfs closed 1 year ago

brendisurfs commented 1 year ago

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.

dynamite-bud commented 1 year ago

Looking into it.

theduke commented 1 year ago

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.

brendisurfs commented 1 year ago

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