bytecodealliance/wac

Create CLI flag to disable registry fetching

Closed this issue · 3 comments

Although there is a cargo feature that allows you to disable support for registries, there times you wouldn't want to fetch from a registry and still have the ability to fetch from a registry later on. Right now, you have to do cargo install wac-cli --no-default-features --features wit to disable it. Most people who are trying this tooling out for the first time get an error when they try to wac encode (for example, our composition example we have in wasmCloud to introduce people to the concept):

error: no home registry registry server URL is configured

There should be a global env variable and flag that allows you to disable fetching from a registry

Also as a heads up, a workaround for this is to pass --registry wa.dev, but I still don't like that either.

I'm curious if a better solution would be to only fetch from a registry if there are unsatisfied dependencies locally

This sounds like an unintentional bug. Looking into it.

This was fixed in the 0.3.0 release. It was unintended behavior.