...
import { instantiateComponent } from '@pavelsavara/jsco';
const instance = await instantiateComponent('./hello/wasm/hello.wasm', {
'hello:city/city': { sendMessage: console.log }
});
const run = instance.exports['hello:city/greeter'].run;
run({ name: 'Kladno', headCount: 100000, budget: 0n});
For the project page see https://github.com/pavelsavara/jsco
For the source of this demo see https://github.com/pavelsavara/jsco/tree/demo-page