Skip to content

Jco failing to encode HTTP component w/ wasi:http@0.2.4 #700

@vados-cosmonic

Description

@vados-cosmonic

With the given WIT:

package example:hono;

world component {
    import wasi:cli/environment@0.2.4;
    export wasi:http/incoming-handler@0.2.4;
}

Trying to compile a component fails:

(jco componentize) 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.4` function `handle`
    at componentNew (file:///tmp/hono-example/node_modules/@bytecodealliance/jco/obj/wasm-tools.js:3740:11)
    at componentNew (file:///tmp/hono-example/node_modules/@bytecodealliance/jco/src/api.js:37:10)
    at async componentize (file:///tmp/hono-example/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js/src/componentize.js:420:5)
    at async componentize (file:///tmp/hono-example/node_modules/@bytecodealliance/jco/src/cmd/componentize.js:20:24)
    at async file:///tmp/hono-example/node_modules/@bytecodealliance/jco/src/jco.js:228:9

This will be fixed when #620 merges.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions