While wasi:http/incoming-handler@0.2.2 works fine, version 0.2.4 seems to be broken w/ current bindgen code.
To reproduce
- Create a new jco project
- Fill out
wit/component.wit (see below)
- Use
wkg wit fetch to retrieve dependencies
- Run
jco types -o generated wit/
// wit/component.wit
world component {
export wasi:http/incoming-handler@0.2.4;
}
You should see the following error:
❯ jco types -o generated-wit wit
(jco types) ComponentError: failed to update function `[static]outgoing-body.finish`
at generateTypes (file:///path/to/jco/obj/js-component-bindgen-component.js:3894:11)
at typesComponent (file:///path/to/jco/src/cmd/transpile.js:54:29)
at async types (file:///path/to/jco/src/cmd/transpile.js:18:17)
at async file:///path/to/jco/src/jco.js:200:9