{"id":20453437,"url":"https://github.com/blackaslight/wasm-bundler","last_synced_at":"2026-02-26T07:14:43.222Z","repository":{"id":229557587,"uuid":"777046905","full_name":"BlackAsLight/wasm-bundler","owner":"BlackAsLight","description":"Easily, via the cli, convert wasm binary files into js files to be bundled up together as one single file.","archived":false,"fork":false,"pushed_at":"2024-03-26T03:25:26.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T21:26:44.058Z","etag":null,"topics":["browser","bundle","convert","deno","embed","javascript","transpile","typescript","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://jsr.io/@doctor/wasm-bundler","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlackAsLight.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}},"created_at":"2024-03-25T04:49:37.000Z","updated_at":"2024-08-20T04:04:00.000Z","dependencies_parsed_at":"2024-08-22T13:12:57.659Z","dependency_job_id":"f30b5d24-3b63-46d0-b93c-f1b0229f7ff7","html_url":"https://github.com/BlackAsLight/wasm-bundler","commit_stats":null,"previous_names":["blackaslight/wasm-bundler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fwasm-bundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fwasm-bundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fwasm-bundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackAsLight%2Fwasm-bundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackAsLight","download_url":"https://codeload.github.com/BlackAsLight/wasm-bundler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717336,"owners_count":20498283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["browser","bundle","convert","deno","embed","javascript","transpile","typescript","wasm","webassembly"],"created_at":"2024-11-15T11:12:47.189Z","updated_at":"2026-02-26T07:14:43.162Z","avatar_url":"https://github.com/BlackAsLight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wasm Bundler\nWasm Bundler is a simple script that enables one to embed their `.wasm` file into their javascript code by creating a `.js` file\nthat has the wasm binary file gzipped and stringified to base64 for load. This file can then, if one desired, be bundled into\nother code of yours via your desired bundler. The generated code does need the `@doctor/encoding-stream/base64` dependency to\nfunction properly.\n\n## Example 1\n### Example Command\nAssuming there was a `static/wasm/app.js` and `static/wasm/app_bg.wasm` file already in your code base.\n```\ndeno run --allow-read --allow-write @doctor/wasm-bundler static/wasm/app_bg.wasm ./app.js static/wasm/embed.js\n```\n### Output\n```js\nimport { DecodeBase64Stream } from '@doctor/encoding-stream/base64'\nimport x from './app.js'\n\nx(new Response(\n\tReadableStream.from((async function* () {\n\t\tyield 'Imagine Repeated Base64 Strings Here!'\n\t})())\n\t\t.pipeThrough(new DecodeBase64Stream())\n\t\t.pipeThrough(new DecompressionStream('gzip'))\n))\n```\n\n## Example 2\n### Example Import\nAssuming there was a `static/wasm/app.js` and `static/wasm/app_bg.wasm` file already in your code base.\n```ts\nimport { WasmToJs } from '@doctor/wasm-bundler/mod'\n\n(await Deno.open('./static/wasm/app_bg.wasm'))\n\t.readable\n\t.pipeThrough(new WasmToJs('./app.js'))\n\t.pipeTo(Deno.stdout.writable)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackaslight%2Fwasm-bundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackaslight%2Fwasm-bundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackaslight%2Fwasm-bundler/lists"}