wac compose script.wac -o composed.wasm
when I run this command I get error
error: failed to resolve document
× failed to create registry client: no home registry registry server URL is configured
Can anyone help me with this please?
It looks like the internally used version of wkg
might be having an issue -- could you run wkg config
and see what it outputs?
Also, if you have a wit
folder that you are using, running wkg wit fetch
might help here -- it will download the required deps (that it can resolve -- wasi:*
will usually work automatically, with some others that have the .well-known
discovery set up)
wkg config gives me
Default registry is not set
I have script.wac in composition directory, In deps folder I have both my wasm modules, Then I have go_app and wrappers with wit files and deps which I retrieved using wkg
as per the doc only both wasm files need to be in deps folder in root directory right?
It's a little confusing -- what folder were you running from? If you wouldn't mind putting up a reproduction repo that would be very helpful!
Could you post the wac
command you're running? Are you using a wac script?
It seems that wkg is thinking that you don't have a package present, I think you may want to use the wkg config instructions here, to set a default registry, so we can find out which component it's trying to call out to find.
I'd assume that it shouldn't have to call out at all, but wac
maybe isn't finding the right deps.
You may need to copy some wit folders over to the deps
folder that wac is using
I have script.wac.
I tried copy pasting both wit folders into deps 1)go_app/wit and 2)wrappers/wit
and ran wac compose --deps-dir ./deps -o composed.wasm script.wac in the directory where script.wac is there
but still I get same error
wkg config --default-registry acme.registry.com
Updated config file: /Users/celinesantosh/.config/wasm-pkg/config.toml
Default registry: acme.registry.com
I set a default registry too but not working
Ah I see your updated results -- with the default registry set, what error do you get?
The exact same error?
× failed to create registry client: no home registry registry server URL is configured
You at least shouldn't be getting the error above now that you have a default registry set
also, would you mind trying to use wac plug
?
https://github.com/bytecodealliance/wac?tab=readme-ov-file#quick--easy-compositions
I think the kind of composition you're doing actually doesn't require a full blown wac script
sure I will try it now
Last updated: Apr 08 2025 at 18:03 UTC