https://github.com/dueen/fastify-wasm
Plugin for loading and executing WebAssembly modules in Fastify.
https://github.com/dueen/fastify-wasm
fastify fastify-plugins plugin wasm webassemby
Last synced: about 1 month ago
JSON representation
Plugin for loading and executing WebAssembly modules in Fastify.
- Host: GitHub
- URL: https://github.com/dueen/fastify-wasm
- Owner: Dueen
- License: mit
- Created: 2025-03-12T18:50:56.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-07T05:50:21.000Z (about 1 month ago)
- Last Synced: 2025-04-07T05:51:07.501Z (about 1 month ago)
- Topics: fastify, fastify-plugins, plugin, wasm, webassemby
- Language: JavaScript
- Homepage:
- Size: 335 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastify-wasm
[](https://github.com/dueen/fastify-wasm/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/fastify-wasm)
[](https://github.com/neostandard/neostandard)A Fastify plugin for loading and executing WebAssembly modules.
### Install
```shell
npm i fastify-wasm
```### Usage
This 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.
```js
"use strict";const fastify = require("fastify")
const fastifyWasm = require("fastify-wasm")const app = fastify()
app.register(fastifyWasm, {
path: 'path/to/your/wasm',
})app.listen({ port: 3000 }, (err) => {
if (err) throw err;
});
```### TypeScript
This plugin includes TypeScript definitions for better type safety and improved developer experience.
```ts
import fastify from "fastify";
import fastifyWasm from "fastify-wasm";const app = fastify();
app.register(fastifyWasm, {
path: 'path/to/your/wasm',
});app.listen({ port: 3000 }, (err) => {
if (err) throw err;
});
```## License
Licensed under [MIT](./LICENSE).