Stream: warg

Topic: wkg get


view this post on Zulip Lann Martin (May 17 2024 at 12:30):

$ cargo install wkg
[...SNIP...]
   Installed package `wkg v0.2.0` (executable `wkg`)

$ wkg get wasi:cli
No version specified; fetching version list...
Getting wasi:cli@0.2.0...
Wrote './wasi_cli@0.2.0.wit'

$ head -1 wasi_cli@0.2.0.wit
package wasi:cli@0.2.0;

$ wkg get --registry lann.wa.dev lann:hello-world@1.0.0
Getting lann:hello-world@1.0.0...
Wrote './lann_hello-world@1.0.0.wasm'

$ wasmtime run lann_hello-world@1.0.0.wasm
Hello, world!

view this post on Zulip Lann Martin (May 17 2024 at 13:00):

...and we already have a bug; failure if you don't have a docker config: https://github.com/bytecodealliance/wasm-pkg-tools/issues/19

The error handling logic for docker_credentials doesn't properly handle missing or malformed ~/.docker/config.json, causing even requests that don't need auth to fail with Error: failed to get regi...

view this post on Zulip Lann Martin (May 17 2024 at 15:02):

https://github.com/bytecodealliance/wasm-pkg-tools/pull/20

The docker_credential crate doesn't provide a ton of precision in its errors, so we'll downgrade all of its errors to a warning at worst to prevent unnecessary failures. This should remove an entir...

view this post on Zulip Ralph (May 17 2024 at 15:23):

I loooooove early bugs. great to see this!!!

view this post on Zulip Lann Martin (May 17 2024 at 16:30):

0.3.0 just published with fix


Last updated: Dec 23 2024 at 12:05 UTC