Stream: general

Topic: wac tool giving error


view this post on Zulip celine santosh (Mar 02 2025 at 21:44):

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?

view this post on Zulip Victor Adossi (Mar 03 2025 at 12:50):

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)

Contribute to bytecodealliance/wasm-pkg-tools development by creating an account on GitHub.

view this post on Zulip celine santosh (Mar 03 2025 at 19:35):

wkg config gives me
Default registry is not set

view this post on Zulip celine santosh (Mar 03 2025 at 19:40):

image.png

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

view this post on Zulip celine santosh (Mar 03 2025 at 19:41):

as per the doc only both wasm files need to be in deps folder in root directory right?

view this post on Zulip Victor Adossi (Mar 04 2025 at 13:23):

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

Contribute to bytecodealliance/wasm-pkg-tools development by creating an account on GitHub.

view this post on Zulip celine santosh (Mar 04 2025 at 17:15):

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

view this post on Zulip celine santosh (Mar 04 2025 at 17:15):

but still I get same error

view this post on Zulip celine santosh (Mar 04 2025 at 17:17):

wkg config --default-registry acme.registry.com

Updated config file: /Users/celinesantosh/.config/wasm-pkg/config.toml

Default registry: acme.registry.com

view this post on Zulip celine santosh (Mar 04 2025 at 17:17):

I set a default registry too but not working

view this post on Zulip Victor Adossi (Mar 04 2025 at 17:22):

Ah I see your updated results -- with the default registry set, what error do you get?

view this post on Zulip Victor Adossi (Mar 04 2025 at 17:22):

The exact same error?

view this post on Zulip Victor Adossi (Mar 04 2025 at 17:22):

× 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

view this post on Zulip Victor Adossi (Mar 04 2025 at 17:23):

also, would you mind trying to use wac plug ?

view this post on Zulip Victor Adossi (Mar 04 2025 at 17:24):

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

WebAssembly Composition (WAC) tooling. Contribute to bytecodealliance/wac development by creating an account on GitHub.

view this post on Zulip celine santosh (Mar 04 2025 at 17:37):

sure I will try it now


Last updated: Apr 08 2025 at 18:03 UTC