Catalog npm
PACKAGE EXPLORERView in registry

2wasm

npm

A command-line tool to convert OpenAPI specifications into WebAssembly plugins

cliextismopenapiwasmwebassembly
Versions collected1
Direct dependencies8From release 0.0.3
Last observed20 Oct, 19:20 UTC

README

Current package documentation

OpenAPI to WebAssembly CLI

A command-line tool built with Bun and Extism to convert OpenAPI specifications into WebAssembly plugins.

Features

  • Convert OpenAPI specification files (YAML or JSON) to WASM plugins
  • Automatically generate TypeScript handlers for each API endpoint
  • Create a compatible WebAssembly module and manifest file
  • Support for path parameters, query parameters, and request bodies

Prerequisites

Installation

NPM Installation

# Install globally
npm install -g openapi2wasm

# Or install locally in your project
npm install --save-dev openapi2wasm

Manual Installation

# Clone the repository
git clone https://github.com/yourusername/openapi-2-wasm-cli.git
cd openapi-2-wasm-cli

# Install dependencies
bun install

Usage

# If installed via npm (globally)
openapi2wasm --schema path/to/your/openapi.yaml

# If installed manually or locally
./index.ts --schema path/to/your/openapi.yaml

# Specify output directory
openapi2wasm --schema path/to/your/openapi.yaml --output ./dist

# Specify a custom name for the plugin
openapi2wasm --schema path/to/your/openapi.yaml --name my-custom-plugin

Options

  • --schema, -s: Path to the OpenAPI schema file (YAML or JSON) (required)
  • --output, -o: Output directory for the generated files (default: current directory)
  • --name, -n: Custom name for the plugin (default: derived from the schema's title)

Output Files

The tool generates:

  • [plugin-name].wasm: The WebAssembly plugin file
  • manifest.json: The plugin manifest file for Extism

How it Works

  1. The tool reads and parses the OpenAPI specification
  2. Generates TypeScript code for each API endpoint
  3. Creates PDK integration files
  4. Compiles the TypeScript code to JavaScript
  5. Uses Extism to build the final WASM plugin

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.3Registry latest11 Apr 20258

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

NOT_FOUND
micro-wasm/openapi2wasm

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:20 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:13f5e7e3399906eb36f1148ec0a0ed57ed97a462b0e562a96ee2b1b3e9b6d7dd