Is your feature request related to a problem?
Current fastly compute build inside Dockerfile-rust occasionally warns:
failed to download latest wasm-tools release: failed to request GitHub metadata: 403 Forbidden
because the CLI tries to fetch wasm-tools from GitHub unauthenticated.
Describe the solution you'd like
Add a cargo install wasm-tools --locked step to the Dockerfile-rust so the binary is already on $PATH.
Example:
&& rustup target add wasm32-wasip1 --toolchain ${RUST_TOOLCHAIN} \
&& apt-get update && apt-get install -y curl jq && apt-get -y clean && rm -rf /var/lib/apt/lists/* \
+ && cargo install wasm-tools --locked \
&& export FASTLY_CLI_VERSION=$(curl -s https://api.github.com/repos/fastly/cli/releases/latest ...
This makes fastly compute build fully offline and removes the 403 noise.
Describe alternatives you've considered
- Authenticate GitHub API requests via
GITHUB_TOKEN (not ideal for a public image)
- Ignore the warning (works but confusing for new users)
Additional context
Adding wasm-tools increases build time slightly but eliminates the external dependency and makes builds reproducible in CI/CD.
Is your feature request related to a problem?
Current
fastly compute buildinsideDockerfile-rustoccasionally warns:because the CLI tries to fetch
wasm-toolsfrom GitHub unauthenticated.Describe the solution you'd like
Add a
cargo install wasm-tools --lockedstep to the Dockerfile-rust so the binary is already on$PATH.Example:
&& rustup target add wasm32-wasip1 --toolchain ${RUST_TOOLCHAIN} \ && apt-get update && apt-get install -y curl jq && apt-get -y clean && rm -rf /var/lib/apt/lists/* \ + && cargo install wasm-tools --locked \ && export FASTLY_CLI_VERSION=$(curl -s https://api.github.com/repos/fastly/cli/releases/latest ...This makes
fastly compute buildfully offline and removes the 403 noise.Describe alternatives you've considered
GITHUB_TOKEN(not ideal for a public image)Additional context
Adding
wasm-toolsincreases build time slightly but eliminates the external dependency and makes builds reproducible in CI/CD.