{"id":50922251,"url":"https://github.com/guest271314/native-messaging-js2wasm","last_synced_at":"2026-06-16T19:31:01.336Z","repository":{"id":362827997,"uuid":"1260894603","full_name":"guest271314/native-messaging-js2wasm","owner":"guest271314","description":"js2wasm Native Messaging host","archived":false,"fork":false,"pushed_at":"2026-06-06T05:19:34.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T06:13:16.672Z","etag":null,"topics":["javascript","native-messaging","native-messaging-host","typescript","wasm","wasmgc"],"latest_commit_sha":null,"homepage":"","language":"WebAssembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guest271314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T02:01:15.000Z","updated_at":"2026-06-06T05:19:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/guest271314/native-messaging-js2wasm","commit_stats":null,"previous_names":["guest271314/native-messaging-js2wasm"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/guest271314/native-messaging-js2wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guest271314%2Fnative-messaging-js2wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guest271314%2Fnative-messaging-js2wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guest271314%2Fnative-messaging-js2wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guest271314%2Fnative-messaging-js2wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guest271314","download_url":"https://codeload.github.com/guest271314/native-messaging-js2wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guest271314%2Fnative-messaging-js2wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34421324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","native-messaging","native-messaging-host","typescript","wasm","wasmgc"],"created_at":"2026-06-16T19:31:00.531Z","updated_at":"2026-06-16T19:31:01.325Z","avatar_url":"https://github.com/guest271314.png","language":"WebAssembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"## js2wasm Native Messaging host\n\n### Install \n\n\u003e [js2wasm](https://github.com/loopdive/js2)\n\u003e\n\u003e Direct AOT compilation from JavaScript and TypeScript to WebAssembly GC.\n\n```shell\nbun install --trust https://github.com/loopdive/js2\n```\n## Transpile, compile, bundle\n\n### Transpile TypeScript to JavaScript\n```shell\nbun build ./node_modules/@loopdive/js2/examples/native-messaging/nm_js2wasm.ts --target=node --outfile=nm_js2wasm.js\n```\n\n### Compile JavaScript to WASM GC\n\n```shell\nbun ./node_modules/@loopdive/js2/src/cli.ts nm_js2wasm.js --wit --target wasi -o .\n```\n\n### Compile TypeScript to WASM GC\n\n```shell\nbun ./node_modules/@loopdive/js2/src/cli.ts ./node_modules/@loopdive/js2/examples/native-messaging/nm_js2wasm.ts --wit --target wasi -o .\n```\n\n### Bundle js2wasm\n\nAlternatively bundle `./node_modules/@loopdive/js2/src/cli.ts` to standalone JavaScript and substitute `js2wasm.js` above\n\n```shell\nbun build ./node_modules/@loopdive/js2/src/cli.ts --target=node --minify --outfile=js2wasm.js \n```\n\n### Installation and usage on Chrome and Chromium\n\n1. Navigate to `chrome://extensions`.\n2. Toggle `Developer mode`.\n3. Click `Load unpacked`.\n4. Select `native-messaging-js2wasm` folder.\n5. Note the generated extension ID.\n6. Open `nm_js2wasm.json` in a text editor, set `\"path\"` to absolute path of `nm_js2wasm.sh` (executes your local `wasmtime` or other WebAssembly runtime and the compiled `nm_js2wasm.js.wasm` or ``nm_js2wasm.wasm` file), and `chrome-extension://\u003cID\u003e/` using ID from 5 in `\"allowed_origins\"` array; and make sure `wasmtime` is in `PATH` and `nm_js2wasm.sh` is executable.\n7. Copy the `nm_js2wasm.json` file to Chrome or Chromium configuration folder, e.g., Chromium on \\*nix `~/.config/chromium/NativeMessagingHosts`; Chrome dev channel on \\*nix `~/.config/google-chrome-unstable/NativeMessagingHosts`.\n8. To test click `service worker` link in panel of unpacked extension which is DevTools for `background.js` in MV3 `ServiceWorker`, observe echo'ed message from `js2wasm` Native Messaging host. To disconnect run `port.disconnect()`.\n\nThe Native Messaging host echoes back the message passed. \n\nFor differences between OS and browser implementations see [Chrome incompatibilities](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities#native_messaging).\n\n## License\nDo What the Fuck You Want to Public License [WTFPLv2](http://www.wtfpl.net/about/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguest271314%2Fnative-messaging-js2wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguest271314%2Fnative-messaging-js2wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguest271314%2Fnative-messaging-js2wasm/lists"}