{"id":27131874,"url":"https://github.com/dueen/fastify-wasm","last_synced_at":"2026-04-07T04:31:27.155Z","repository":{"id":286549609,"uuid":"947479949","full_name":"Dueen/fastify-wasm","owner":"Dueen","description":"Plugin for loading and executing WebAssembly modules in Fastify.","archived":false,"fork":false,"pushed_at":"2025-04-07T05:50:21.000Z","size":343,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T05:51:07.501Z","etag":null,"topics":["fastify","fastify-plugins","plugin","wasm","webassemby"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Dueen.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":"2025-03-12T18:50:56.000Z","updated_at":"2025-04-07T05:31:59.000Z","dependencies_parsed_at":"2025-04-07T06:01:24.388Z","dependency_job_id":null,"html_url":"https://github.com/Dueen/fastify-wasm","commit_stats":null,"previous_names":["dueen/fastify-wasm"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dueen%2Ffastify-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dueen%2Ffastify-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dueen%2Ffastify-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dueen%2Ffastify-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dueen","download_url":"https://codeload.github.com/Dueen/fastify-wasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247731777,"owners_count":20986730,"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":["fastify","fastify-plugins","plugin","wasm","webassemby"],"created_at":"2025-04-07T21:27:21.604Z","updated_at":"2026-04-07T04:31:27.149Z","avatar_url":"https://github.com/Dueen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastify-wasm\n\n[![CI](https://github.com/dueen/fastify-wasm/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/dueen/fastify-wasm/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/fastify-wasm.svg?style=flat)](https://www.npmjs.com/package/fastify-wasm)\n[![License](https://img.shields.io/npm/l/@jsdevtools/npm-publish.svg)](LICENSE)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)\n\nA Fastify plugin for loading and executing WebAssembly modules.\n\n### Install\n\n```shell\nnpm i fastify-wasm\n```\n\n### Usage\n\nThis plugin enables you to load and execute WebAssembly modules within a Fastify application. Simply register the plugin and provide the path to your WebAssembly file.\n\n```js\n\"use strict\";\n\nconst fastify = require(\"fastify\")\nconst fastifyWasm = require(\"fastify-wasm\")\n\nconst app = fastify()\n\napp.register(fastifyWasm, {\n  path: 'path/to/your/wasm',\n})\n\napp.listen({ port: 3000 }, (err) =\u003e {\n  if (err) throw err;\n});\n```\n\n### TypeScript\n\nThis plugin includes TypeScript definitions for better type safety and improved developer experience.\nExports from the WebAssembly module can be typed on the `FastifyWasmExports` interface.\n\n```ts\nimport fastify from \"fastify\";\nimport fastifyWasm from \"fastify-wasm\";\n\ninterface FastifyWasmExports {\n  add(lhs: number, rhs: number): number\n}\n\nconst app = fastify();\n\napp.register(fastifyWasm, {\n  path: 'path/to/your/wasm',\n});\n\napp.get('/', (_req, reply) =\u003e {\n  // Call the exported function `add` from the wasm module\n  const { add } = fastify.wasm.instance.exports\n  reply.send({ result: add(2, 2) })\n})\n\napp.listen({ port: 3000 }, (err) =\u003e {\n  if (err) throw err;\n});\n```\n\n## License\n\nLicensed under [MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdueen%2Ffastify-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdueen%2Ffastify-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdueen%2Ffastify-wasm/lists"}