Skip to content

feat: support richer WebAssembly Component Model value types in the CLI #4823

@harrshita123

Description

@harrshita123

Summary

The WasmEdge CLI currently has limited support for invoking WebAssembly Component Model exports with non-numeric value types. It would be useful if the CLI could accept and print richer component values, such as strings, lists, records, variants, options, and results.

Details

At the moment, CLI component invocation appears focused on scalar numeric values like s32, u32, s64, u64, f32, and f64. This makes it difficult to manually test or demo components that expose higher-level WIT types.

Expected CLI support could include:

  • Passing string arguments from the command line
  • Printing string/list/record/variant/option/result return values in a readable format
  • Defining a stable syntax for structured component arguments
  • Clear errors for unsupported component value types

This would make the Component Model support easier to test from the CLI without needing a custom embedding host.

Appendix

Related area in source:

  • lib/driver/runtimeTool.cpp
  • Existing TODO: component CLI handling for other types

I can provide a small WIT/component example if that would help define the expected CLI syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage-required

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions