Skip to content

Enable composing components that use GC #158

Open

Description

@gertvv

For example, plugging a component with wasm-gc internals into a wasi-cli command:

$ wac plug command-incomplete.wasm --plug gc_component.wasm  -o command.wasm
error: struct indexed types not supported without the gc feature (at offset 0x16)

I couldn't find any flag to enable GC support.

Activity

  1. tanishiking commented on Jun 12, 2025

    @tanishiking
    Contributor

    @gertvv It is fixed by #146
    Unfortunately, the new version hasn't yet released, use cargo install --git https://github.com/bytecodealliance/wac wac-cli

  2. calvinrp commented on Jun 25, 2025

    @calvinrp
    Collaborator

    Let me know if this works in the latest 0.7.0 release.

  3. gertvv commented on Jun 30, 2025

    @gertvv
    Author

    I didn't have my original example any longer, but I was able to implement the "reverse" part of the jco string-reverse-upper example in WAT using GC arrays and compose it with the JS compiled to WASM outer component without problems. I'm happy to share the example if useful.

    Edit: I've published it as the addendum here: https://github.com/gertvv/wasm-component-raw/

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