You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Jco crashes when using same interface name from different packages #307
Cloned from
I'm trying to use two different wasm components where both components exporting the same interface. When I run componentize of jco it is crashing because the bindings are using the same names.
$ jco componentize -w wit -d all -o dist/custom.wasm src/actions.js
(jco componentize) Error: Failed to initialize component:
Exception while running initialization script
/var/folders/8_/7m7fz4qd4730mbpvtmfjctlc0000gn/T/a63ab51139cd/sources/initializer.js:8:43 SyntaxError: redeclaration of let $import_http$run:
/var/folders/8_/7m7fz4qd4730mbpvtmfjctlc0000gn/T/a63ab51139cd/sources/initializer.js:8:43 let [$memory, $realloc, $import_http$run, $import_http$run] = $bindings;
/var/folders/8_/7m7fz4qd4730mbpvtmfjctlc0000gn/T/a63ab51139cd/sources/initializer.js:8:43 ..........................................^
/var/folders/8_/7m7fz4qd4730mbpvtmfjctlc0000gn/T/a63ab51139cd/sources/initializer.js:8:25 note: Previously declared at line 8, column 25
at componentize (file:///Users/sandervanriessen/Downloads/tmp/jco-same-wit-interfaces/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js/src/componentize.js:352:11)
at async componentize (file:///Users/sandervanriessen/Downloads/tmp/jco-same-wit-interfaces/node_modules/@bytecodealliance/jco/src/cmd/componentize.js:20:24)
at async file:///Users/sandervanriessen/Downloads/tmp/jco-same-wit-interfaces/node_modules/@bytecodealliance/jco/src/jco.js:467:17
I have created a public repo which can be cloned to reproduce the issue
Activity
SanderVanRiessen commentedon Oct 13, 2025
I created a PR to fix this issue. In the changes I included the import name in the imported functions, so the names are always unique. #306
SanderVanRiessen commentedon Oct 28, 2025
Closing this issue since it is fixed as of version
0.19.3