Skip to content

WAB plug and compose fails? #148

Open

Description

@Bab64

Hi,
I've tested the 'hello' example with my installation and it works... Thanks for building WAC! However, I'm not able to run the following example:

package bab:compound; // Compound.wit
world compound-world {
    export compound-interface: interface { // Inline def. of interface...
        compound-function: func();
    }
}

/**/

package bab:composite; // 'Composite.wit'
world composite-world { // a.k.a. "socket" component
    import compound-interface: interface { // Inline def. of interface...
        compound-function: func();
    }
}

/ Transform wit into wasm: /

wasm-tools component wit --wasm -o ./composition/Compound.wasm ./composition/Compound.wit
wasm-tools component wit --wasm -o ./composition/Composite.wasm ./composition/Composite.wit

/ Compose with 'plug': /
wac plug --plug ./composition/Compound.wasm ./composition/Composite.wasm -o ./composition/Composition.wasm
/* Error message is: */
error: the socket component had no matching imports for the plugs that were provided

I've feeling that the error message is "wrong" because the "compound-interface" matches? Thanks for any help... Regards.
PS: wac compose does NOT work as well (open an other issue on that...)

Activity

  1. Bab64 commented on Jan 14, 2025

    @Bab64
    Author

    Here is the scenario with wac compose:
    wac compose ./composition/Composition.wac --deps-dir . -o ./composition/Composition.wasm
    WAC config. file:

    package barbierdarnal-com:composition; // 'Composition.wac'
    // Instantiate `compound`:
    let compound = new composition:compound-world { ... }; // '...' is syntax! => import
    // Instantiate `composite` by stuffing imported `compound-interface` by means of exported `compound-interface` of `compound`:
    let composite = new composition:composite-world {compound-interface: compound.compound-interface, ... };
    

    /* Error message: */
    error: failed to resolve document

    × failed to create registry client: no home registry registry server URL is configured

  2. Bab64 commented on Jan 14, 2025

    @Bab64
    Author

    Here is the scenario with wac compose:
    wac compose ./composition/Composition.wac --deps-dir . -o ./composition/Composition.wasm
    WAC config. file:

    package barbierdarnal-com:composition; // 'Composition.wac'
    // Instantiate `compound`:
    let compound = new composition:compound-world { ... }; // '...' is syntax! => import
    // Instantiate `composite` by stuffing imported `compound-interface` by means of exported `compound-interface` of `compound`:
    let composite = new composition:composite-world {compound-interface: compound.compound-interface, ... };
    

    /* Error message: */
    error: failed to resolve document

    × failed to create registry client: no home registry registry server URL is configured

  3. celinesantosh98 commented on Mar 6, 2025

    @celinesantosh98

    I get this same error too.

  4. celinesantosh98 commented on Mar 6, 2025

    @celinesantosh98

    Is there any fix for this

  5. Back0fnGurke commented on Aug 5, 2025

    @Back0fnGurke

    Getting the same error. Defining --registry wa.dev solved it #122.

    Edit: This was another issue I was facing and caused the error to occur #136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions