Skip to content

Componentization of app with wasi/http@0.2.0 fails with version 0.16.0 #182

@karthik2804

Description

@karthik2804

A guest app with the wit targetting the wasi 0.2.0 world fails to componentize successfully and runs into the following error when using the fetch event handler.

example world

world platform {
  import wasi:http/outgoing-handler@0.2.0;
}
An error occurred during the componentization process: ComponentError: failed to encode a component from module
$failed to decode world from module

Caused by:
    0: module was not valid
    1: failed to find export of interface `wasi:http/incoming-handler@0.2.0` function `handle`
    at componentNew (file:///Users/karthik_ganeshram/test-app/node_modules/@bytecodealliance/jco/obj/wasm-tools.js:3618:11)
    at componentNew (file:///Users/karthik_ganeshram/test-app/node_modules/@bytecodealliance/jco/src/api.js:37:10)
    at async componentize (file:///Users/karthik_ganeshram/test-app/node_modules/@bytecodealliance/componentize-js/src/componentize.js:419:5)
    at async file:///Users/karthik_ganeshram/test-app/bin/j2w.mjs:113:31

The app build successfully when using ComponentizeJS version 0.15.1.

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