{"id":17793186,"url":"https://github.com/jcbhmr/hello-world-wasm-pack-lib","last_synced_at":"2026-05-09T09:16:22.969Z","repository":{"id":214579912,"uuid":"736865092","full_name":"jcbhmr/hello-world-wasm-pack-lib","owner":"jcbhmr","description":"🦀 Greeter demo using wasm-pack to create an npm package","archived":false,"fork":false,"pushed_at":"2024-01-03T20:37:41.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T11:58:06.083Z","etag":null,"topics":["javascript-bindings","library","rust","typescript","wasm","wasm-bindgen","wasm-pack","webassembly"],"latest_commit_sha":null,"homepage":"https://tsdocs.dev/docs/hello-world-wasm-pack-lib","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcbhmr.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":"2023-12-29T05:21:55.000Z","updated_at":"2024-01-11T05:30:46.000Z","dependencies_parsed_at":"2024-01-03T04:36:03.750Z","dependency_job_id":"3ec4f9e4-7aca-463c-884b-9614137cdd1d","html_url":"https://github.com/jcbhmr/hello-world-wasm-pack-lib","commit_stats":null,"previous_names":["jcbhmr/hello-world-wasm-pack-lib"],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/jcbhmr/hello-world-wasm-pack-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Fhello-world-wasm-pack-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Fhello-world-wasm-pack-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Fhello-world-wasm-pack-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Fhello-world-wasm-pack-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcbhmr","download_url":"https://codeload.github.com/jcbhmr/hello-world-wasm-pack-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcbhmr%2Fhello-world-wasm-pack-lib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261037067,"owners_count":23100933,"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":["javascript-bindings","library","rust","typescript","wasm","wasm-bindgen","wasm-pack","webassembly"],"created_at":"2024-10-27T11:05:10.588Z","updated_at":"2026-05-09T09:16:17.942Z","avatar_url":"https://github.com/jcbhmr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \"Hello world!\" wasm-pack library\n\n🦀 Greeter demo using wasm-pack to create an npm package\n\n\u003ctable align=center\u003e\u003ctd\u003e\n\n```js\nimport { greet, Calculator } from \"hello-world-wasm-pack-lib\";\n\ngreet(\"Alan Turing\");\n//=\u003e 'Hello Alan Turing!'\n\nconst calc = new Calculator();\ncalc.add(10);\nconsole.log(calc.value);\n//=\u003e 10\ncalc.mult(20);\nconsole.log(calc.value);\n//=\u003e 200\n```\n\n\u003c/table\u003e\n\n\u003cp align=center\u003e\n  \u003ca href=\"https://tsdocs.dev/docs/hello-world-wasm-pack-lib\"\u003eDocs\u003c/a\u003e\n  | \u003ca href=\"https://www.npmjs.com/package/hello-world-wasm-pack-lib\"\u003enpm package\u003c/a\u003e\n\u003c/p\u003e\n\n🦀 Written in Rust! \\\n🟪 Compiled to WebAssembly \\\n🟨 Exposed to JavaScript \\\n🎉 Great way to see what wasm-pack can do \\\n👩‍⚖️ [0BSD licensed](./LICENSE) template\n\n## Installation\n\n![npm](https://img.shields.io/static/v1?style=for-the-badge\u0026message=npm\u0026color=CB3837\u0026logo=npm\u0026logoColor=FFFFFF\u0026label=)\n![Yarn](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Yarn\u0026color=2C8EBB\u0026logo=Yarn\u0026logoColor=FFFFFF\u0026label=)\n![pnpm](https://img.shields.io/static/v1?style=for-the-badge\u0026message=pnpm\u0026color=222222\u0026logo=pnpm\u0026logoColor=F69220\u0026label=)\n![Deno](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Deno\u0026color=000000\u0026logo=Deno\u0026logoColor=FFFFFF\u0026label=)\n![Bun](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Bun\u0026color=000000\u0026logo=Bun\u0026logoColor=FFFFFF\u0026label=)\n![jsDelivr](https://img.shields.io/static/v1?style=for-the-badge\u0026message=jsDelivr\u0026color=E84D3D\u0026logo=jsDelivr\u0026logoColor=FFFFFF\u0026label=)\n\nYou can install this package using your favorite npm package manager like npm,\n[Yarn], [pnpm], or [Bun].\n\n```sh\nnpm install hello-world-wasm-pack-lib\n```\n\nIf you're using [Deno] you can import it straight from npm:\n\n```js\nimport {} from \"npm:hello-world-wasm-pack-lib\";\n```\n\nIf you prefer to go buildless in the browser you can use an npm CDN like\n[jsDelivr] or [esm.sh].\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {} from \"https://esm.run/hello-world-wasm-pack-lib\";\n\u003c/script\u003e\n```\n\n## Usage\n\n![Node.js](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Node.js\u0026color=339933\u0026logo=Node.js\u0026logoColor=FFFFFF\u0026label=)\n![Deno](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Deno\u0026color=000000\u0026logo=Deno\u0026logoColor=FFFFFF\u0026label=)\n![Bun](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Bun\u0026color=000000\u0026logo=Bun\u0026logoColor=FFFFFF\u0026label=)\n![Browser](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Browser\u0026color=4285F4\u0026logo=Google+Chrome\u0026logoColor=FFFFFF\u0026label=)\n\nYou should be able to just import and use this JavaScript package like any\nother. The WASM magic is hidden behind a really nice wrapper layer.\n\n```js\nimport { greet, Calculator, get_report } from \"hello-world-wasm-pack-lib\";\n\ngreet(\"Alan Turing\");\n//=\u003e 'Hello Alan Turing!'\n\nconst report = get_report();\nconsole.log(report);\n//=\u003e Report {\n//   dog_count: 5,\n//   bouncy_castles: 3,\n//   fun_percent: 76.8\n// }\n```\n\n[📚 You can find complete API documentation on the docs website](https://tsdocs.dev/docs/hello-world-wasm-pack-lib)\n\n## Development\n\n![Rust](https://img.shields.io/static/v1?style=for-the-badge\u0026message=Rust\u0026color=000000\u0026logo=Rust\u0026logoColor=FFFFFF\u0026label=)\n![WebAssembly](https://img.shields.io/static/v1?style=for-the-badge\u0026message=WebAssembly\u0026color=654FF0\u0026logo=WebAssembly\u0026logoColor=FFFFFF\u0026label=)\n![JavaScript](https://img.shields.io/static/v1?style=for-the-badge\u0026message=JavaScript\u0026color=222222\u0026logo=JavaScript\u0026logoColor=F7DF1E\u0026label=)\n\nTo build the JavaScript package just run `./just build`. Then you can `cd` into\nthe `pkg/` folder if you want and launch a REPL to try it out!\n\n```sh\n./just build\ncd pkg\nnode\n```\n\nIf you need to edit the `pkg.patch` file, you can do so via the below command.\nIt will create two folders: `a/` and `b/`. Edit anything in the `b/` folder and\na `.patch` will be generated against the `a/` folder and saved to `pkg.patch`.\n\n```sh\n./just generate-patch\n# Pauses while you make changes...\n```\n\n\u003c!-- prettier-ignore-start --\u003e\n[Yarn]: https://yarnpkg.com/\n[pnpm]: https://pnpm.io/\n[Bun]: https://bun.sh/\n[Deno]: https://deno.com/\n[jsDelivr]: https://www.jsdelivr.com/\n[esm.sh]: https://esm.sh/\n\u003c!-- prettier-ignore-end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcbhmr%2Fhello-world-wasm-pack-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcbhmr%2Fhello-world-wasm-pack-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcbhmr%2Fhello-world-wasm-pack-lib/lists"}